Skip to content

Commit

Permalink
Merge branch 'erlang:master' into ct-sum-time
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikaka27 authored Feb 12, 2024
2 parents 1e9c667 + aa94ab2 commit d1e90f2
Show file tree
Hide file tree
Showing 3,743 changed files with 345,573 additions and 498,385 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
6 changes: 3 additions & 3 deletions .github/actions/build-base-image/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ runs:
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Cache BASE image
uses: actions/cache@v3.3.3
uses: actions/cache@v4.0.0
if: inputs.TYPE == '64-bit' || inputs.TYPE == 'clang'
with:
path: otp_docker_base.tar
Expand All @@ -45,13 +45,13 @@ runs:

- name: Cache pre-built src
if: inputs.BUILD_IMAGE == 'true'
uses: actions/cache@v3.3.3
uses: actions/cache@v4.0.0
with:
path: otp_src.tar.gz
key: prebuilt-src-${{ github.ref_name }}-${{ github.sha }}
- name: Cache pre-built binaries
if: inputs.BUILD_IMAGE == 'true'
uses: actions/cache@v3.3.3
uses: actions/cache@v4.0.0
with:
path: otp_cache.tar.gz
key: prebuilt-cache-${{ inputs.TYPE }}-${{ github.ref_name }}-${{ github.sha }}
Expand Down
2 changes: 1 addition & 1 deletion .github/dockerfiles/Dockerfile.debian-base
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RUN apt-get update && apt-get -y upgrade && apt-get install -y build-essential &
sed -i "s:deb http:deb [arch=$BUILD_ARCH,$HOST_ARCH] http:g" /etc/apt/sources.list; \
fi && \
apt-get update && \
apt-get install -y build-essential m4 autoconf fop xsltproc default-jdk libxml2-utils \
apt-get install -y build-essential m4 autoconf default-jdk \
$INSTALL_LIBS && \
if [ "$HOST_TRIP" != "$BUILD_TRIP" ]; then \
apt-get install -y -f \
Expand Down
29 changes: 27 additions & 2 deletions .github/dockerfiles/Dockerfile.ubuntu-base
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ ENV LANG=C.UTF-8 LC_ALL=C.UTF-8

## Install build tools
RUN apt-get update && apt-get -y upgrade && \
apt-get install -y build-essential m4 autoconf fop xsltproc \
default-jdk libxml2-utils flex pkg-config locales tzdata sudo ${INSTALL_LIBS} && \
apt-get install -y build-essential m4 autoconf \
default-jdk flex pkg-config locales tzdata sudo ${INSTALL_LIBS} && \
sed -i 's@# en_US.UTF-8@en_US.UTF-8@g' /etc/locale.gen && locale-gen && \
update-alternatives --set wx-config /usr/lib/x86_64-linux-gnu/wx/config/gtk3-unicode-3.0

Expand Down Expand Up @@ -56,6 +56,8 @@ RUN apt-get install -y git curl && \
VSN=$(kerl list releases | grep "^$release" | tail -1); \
if [ $release = $LATEST ]; then \
echo "/usr/local/lib/erlang-${VSN}/bin" > /home/${USER}/LATEST; \
echo "${VSN}" > /home/${USER}/LATEST_VSN; \
echo "${release}" > /home/${USER}/LATEST_RELEASE; \
fi && \
kerl build ${VSN} ${VSN} && \
kerl install ${VSN} /usr/local/lib/erlang-${VSN}; \
Expand Down Expand Up @@ -104,6 +106,29 @@ COPY --chown=${USER}:${GROUP} dockerfiles/init.sh /buildroot/

WORKDIR /buildroot/

## Build and install elixir, hex and ex_doc
ENV ELIXIR_VSN=latest \
HEX_VSN=latest \
EX_DOC_VSN=latest
RUN export PATH="$(cat /home/${USER}/LATEST):${PATH}" && \
set -x && \
mkdir /buildroot/elixir && cd /buildroot/elixir && \
curl -s https://api.github.com/repos/elixir-lang/elixir/releases/${ELIXIR_VSN} | \
jq '.tarball_url' | xargs curl -L > elixir.tar.gz && \
tar xzf elixir.tar.gz --strip-components=1 && \
make && sudo make install && \
mkdir /buildroot/hex && cd /buildroot/hex && \
curl -s https://api.github.com/repos/hexpm/hex/releases/${HEX_VSN} | \
jq '.tarball_url' | xargs curl -L > hex.tar.gz && \
tar xzf hex.tar.gz --strip-components=1 && \
mix install && \
mkdir /buildroot/ex_doc && cd /buildroot/ex_doc && \
curl -s https://api.github.com/repos/elixir-lang/ex_doc/releases/${EX_DOC_VSN} | \
jq '.tarball_url' | xargs curl -L > ex_doc.tar.gz && \
tar xzf ex_doc.tar.gz --strip-components=1 && \
mix deps.get && MIX_ENV=prod mix escript.build && \
sudo cp ex_doc /usr/local/bin/

## Install test tools rebar3, proper and jsx
RUN export PATH="$(cat /home/${USER}/LATEST):${PATH}" && \
latest () { \
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/restore-from-prebuilt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ if [ -n "${ARCHIVE}" ]; then

echo "::group::{Run ${i}: docs}"
### If any of the doc generating tools change, we need to re-compile the docs
if grep "lib/\(xmerl\|erl_docgen\|edoc\)" "${CHANGES}"; then
if grep "lib/\(xmerl\|edoc\)" "${CHANGES}"; then
echo "Deleting all docs as documentation tools have changed" >&2
rm -rf "${CACHE_DIR}"/lib/*/doc/ "${CACHE_DIR}/erts/doc/" "${CACHE_DIR}/system/"
fi
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/actions-updater.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
steps:
- name: Generate token
id: generate_token
uses: actions/create-github-app-token@v1.6.3
uses: actions/create-github-app-token@v1.7.0
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PEM }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/add-to-project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- name: Generate token
id: generate_token
uses: actions/create-github-app-token@v1.6.3
uses: actions/create-github-app-token@v1.7.0
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PEM }}
Expand Down
63 changes: 27 additions & 36 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
ALL_APPS=$(grep '^[a-z_]*:' .github/scripts/path-filters.yaml | sed 's/:.*$//')
ALL_APPS=$(jq -n --arg inarr "${ALL_APPS}" '$inarr | split("\n")' | tr '\n' ' ')
echo "all=${ALL_APPS}" >> $GITHUB_OUTPUT
- uses: dorny/paths-filter@v2.11.1
- uses: dorny/paths-filter@v3.0.0
id: app-changes
with:
filters: .github/scripts/path-filters.yaml
Expand All @@ -70,14 +70,14 @@ jobs:
echo "changes=${CHANGED_APPS}" >> "$GITHUB_OUTPUT"
fi
- name: Cache pre-built src
uses: actions/cache@v3.3.3
uses: actions/cache@v4.0.0
with:
path: otp_src.tar.gz
key: prebuilt-src-${{ github.ref_name }}-${{ github.sha }}
restore-keys: |
prebuilt-src-${{ github.base_ref }}-${{ github.event.pull_request.base.sha }}
- name: Cache pre-built binaries
uses: actions/cache@v3.3.3
uses: actions/cache@v4.0.0
with:
path: otp_cache.tar.gz
key: prebuilt-cache-64-bit-${{ github.ref_name }}-${{ github.sha }}
Expand All @@ -86,11 +86,11 @@ jobs:
- name: Create initial pre-release tar
run: .github/scripts/init-pre-release.sh otp_archive.tar.gz otp_src.tar.gz
- name: Upload source tar archive
uses: actions/upload-artifact@v4.1.0
uses: actions/upload-artifact@v4.3.0
with:
name: otp_git_archive
path: otp_archive.tar.gz
- uses: dorny/paths-filter@v2.11.1
- uses: dorny/paths-filter@v3.0.0
id: cache
with:
filters: |
Expand Down Expand Up @@ -129,7 +129,7 @@ jobs:
"`pwd`/.github/otp.tar.gz" \
"`pwd`/otp_archive.tar.gz"
- name: Upload restored cache
uses: actions/upload-artifact@v4.1.0
uses: actions/upload-artifact@v4.3.0
if: runner.debug == 1
with:
name: restored-cache
Expand All @@ -156,7 +156,7 @@ jobs:
bash -c 'set -x; C_APPS=$(ls -d ./lib/*/c_src); find Makefile ./make ./erts ./bin/`erts/autoconf/config.guess` ./lib/erl_interface ./lib/jinterface ${C_APPS} `echo "${C_APPS}" | sed -e 's:c_src$:priv:'` -type f -newer README.md \! -name "*.beam" \! -path "*/doc/*" | xargs tar --transform "s:^./:otp/:" -uvf /github/otp_cache.tar'
gzip otp_cache.tar
- name: Upload pre-built tar archives
uses: actions/upload-artifact@v4.1.0
uses: actions/upload-artifact@v4.3.0
with:
name: otp_prebuilt
path: |
Expand All @@ -179,7 +179,7 @@ jobs:

- name: Cache wxWidgets
id: wxwidgets-cache
uses: actions/cache@v3.3.3
uses: actions/cache@v4.0.0
with:
path: wxWidgets
key: wxWidgets-${{ env.WXWIDGETS_VERSION }}-${{ runner.os }}-12
Expand All @@ -205,7 +205,7 @@ jobs:
./bin/erl -noshell -eval '{wx_ref,_,_,_} = wx:new(), io:format("wx ok~n"), halt().'
- name: Upload tarball
uses: actions/upload-artifact@v4.1.0
uses: actions/upload-artifact@v4.3.0
with:
name: otp_prebuilt_macos_x86-64
path: otp/otp_macos_*_x86-64.tar.gz
Expand Down Expand Up @@ -239,7 +239,7 @@ jobs:
xcodebuild -create-xcframework -output ./liberlang.xcframework -library liberlang.a
- name: Upload framework
uses: actions/upload-artifact@v4.1.0
uses: actions/upload-artifact@v4.3.0
with:
name: ios_framework_${{ env.TARGET_ARCH }}
path: otp/liberlang.xcframework
Expand Down Expand Up @@ -268,7 +268,7 @@ jobs:
IF EXIST "c:\\Program Files\\OpenSSL-Win64" (move "c:\\Program Files\\OpenSSL-Win64" "c:\\OpenSSL-Win64") ELSE (move "c:\\Program Files\\OpenSSL" "c:\\OpenSSL-Win64")
- name: Cache wxWidgets
uses: actions/cache@v3.3.3
uses: actions/cache@v4.0.0
with:
path: wxWidgets
key: wxWidgets-${{ env.WXWIDGETS_VERSION }}-${{ runner.os }}
Expand Down Expand Up @@ -338,7 +338,7 @@ jobs:
./otp_build installer_win32
- name: Upload installer
uses: actions/upload-artifact@v4.1.0
uses: actions/upload-artifact@v4.3.0
with:
name: otp_win32_installer
path: otp/release/win32/otp*.exe
Expand Down Expand Up @@ -396,34 +396,29 @@ jobs:
## Build all the documentation
- name: Build documentation
run: |
docker build -t otp - <<EOF
if [ "${{ github.event_name }}" = "pull_request" ]; then
BASE_URL="${{ github.event.pull_request.head.repo.full_name }}/blob/${{ github.event.pull_request.head.ref }}/"
else
BASE_URL="${{ github.repository }}/blob/${{ github.ref_name }}/"
fi
docker build --build-arg BASE_URL="$BASE_URL" -t otp - <<EOF
FROM otp
ENV BASE_URL=$BASE_URL
RUN make release docs release_docs && sudo make install-docs
EOF
- name: Release docs to publish
run: |
docker run -v $PWD/:/github otp \
"make release_docs DOC_TARGETS='man html pdf' RELEASE_ROOT=/github/docs"
"make release_docs DOC_TARGETS='html' RELEASE_ROOT=/github/docs"
sudo chown -R `whoami` docs
cd docs
tar czf ../otp_doc_man.tar.gz man
rm -rf man
tar czf ../otp_doc_html.tar.gz *
cd docs && tar czf ../otp_doc_html.tar.gz *
- name: Upload html documentation archive
uses: actions/upload-artifact@v4.1.0
uses: actions/upload-artifact@v4.3.0
with:
name: otp_doc_html
path: otp_doc_html.tar.gz
- name: Upload man documentation archive
uses: actions/[email protected]
with:
name: otp_doc_man
path: otp_doc_man.tar.gz
## Documentation checks
- name: Run xmllint
run: docker run otp "make xmllint"
- name: Run html link check
run: docker run -v $PWD/:/github otp "/github/scripts/otp_html_check /github/docs doc/index.html"
run: docker run -v $PWD/:/github otp "cd /github/docs && /github/scripts/otp_check_html_links.exs"

static:
name: Run static analysis
Expand Down Expand Up @@ -496,7 +491,7 @@ jobs:
sudo bash -c "chown -R `whoami` make_test_dir && chmod -R +r make_test_dir"
tar czf ${{ matrix.type }}_test_results.tar.gz make_test_dir
- name: Upload test results
uses: actions/upload-artifact@v4.1.0
uses: actions/upload-artifact@v4.3.0
if: ${{ !cancelled() }}
with:
name: ${{ matrix.type }}_test_results
Expand Down Expand Up @@ -543,14 +538,14 @@ jobs:
-e 's:\(file="erts/\)make_test_dir/[^/]*:\1test:g' \
make_test_dir/*_junit.xml
- name: Upload test results
uses: actions/upload-artifact@v4.1.0
uses: actions/upload-artifact@v4.3.0
if: ${{ !cancelled() }}
with:
name: test_results
path: test_results.tar.gz
- name: Upload Test Results
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4.1.0
uses: actions/upload-artifact@v4.3.0
with:
name: Unit Test Results
path: |
Expand Down Expand Up @@ -585,10 +580,6 @@ jobs:
uses: actions/[email protected]
with:
name: otp_doc_html
- name: Download man docs
uses: actions/[email protected]
with:
name: otp_doc_man

## We add the correct version name into the file names
## and create the hash files for all assets
Expand Down Expand Up @@ -624,7 +615,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Upload
uses: actions/upload-artifact@v4.1.0
uses: actions/upload-artifact@v4.3.0
with:
name: Event File
path: ${{ github.event_path }}
29 changes: 3 additions & 26 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ JAVADOC-GENERATED
/Makefile

/release
/doc

/make/output.mk
/make/emd2exml
Expand All @@ -164,20 +165,7 @@ JAVADOC-GENERATED
/lib/*/SKIP
/lib/SKIP-APPLICATIONS

/lib/*/doc/html/*.html
/lib/*/doc/html/*.css
/lib/*/doc/html/js
/lib/*/doc/html/*.gif
/lib/*/doc/html/*.jpg
/lib/*/doc/html/*.png
/lib/*/doc/html/*.eix
/lib/*/doc/man[0-9]/*.[0-9]
/lib/*/doc/pdf/*.fo
/lib/*/doc/pdf/*.pdf
/lib/*/doc/src/*.fo
/lib/*/doc/xml/*.xml
/lib/*/doc/xml/*.ent
/lib/*/doc/chunks/*.chunk
/lib/*/doc/html

/lib/config.log
/lib/config.status
Expand Down Expand Up @@ -260,18 +248,7 @@ JAVADOC-GENERATED
# erts

/erts/info
/erts/doc/html/*.html
/erts/doc/html/*.gif
/erts/doc/html/*.jpg
/erts/doc/html/*.eix
/erts/doc/pdf/*.fo
/erts/doc/pdf/*.pdf
/erts/doc/src/*.fo
/erts/doc/xml/*.xml
/erts/doc/xml/figures/*.png
/erts/doc/xml/figures/*.svg
/erts/doc/chunks/*.chunk
/erts/doc/man[0-9]/*.[0-9]
/erts/doc/html/
/erts/doc/CONF_INFO

# et
Expand Down
5 changes: 2 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ There are exceptions, for example corrections to bugs that have been introduced
* TIP: Write the test case **before** fixing the bug so that you can know that it catches the bug.

* For applications without a test suite in the git repository, it would be appreciated if you provide a
small code sample in the commit message or email a module that will provoke the failure.
small code sample in the commit message or attach a module to the PR that will provoke the failure.

### Adding a new feature

Expand Down Expand Up @@ -100,8 +100,7 @@ a discussion on the mailing list.

* Make sure existing test cases don't fail. It is not necessary to run all tests (that would take many hours),
but you should at least run the tests for the application you have changed.
* Make sure the documentation builds and is according to the dtd. eg. `make xmllint` or `cd lib/stdlib/ && make xmllint`
* Make sure no new dialyzer warnings have been added. eg. `make dialyzer` or `cd lib/stdlib/ && make dialyzer`
* Make sure all static checks pass by calling `./otp_build check`. Call `./otp_build check --help` for details on what `./otp_build check` does.
* Make sure that github actions passes, if you go to https://github.com/$YOUR_GITHUB_USER/otp/actions you can enable github actions builds for you otp fork.

See the [Testing](https://github.com/erlang/otp/blob/master/HOWTO/TESTING.md) and
Expand Down
Loading

0 comments on commit d1e90f2

Please sign in to comment.