Bump actions/checkout from 3 to 4 #898
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
branches: | |
- main | |
- bump-rbe | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
otp: | |
- "25.3" | |
- "26.0" | |
steps: | |
- name: CHECKOUT | |
uses: actions/checkout@v4 | |
- name: CONFIGURE ERLANG | |
uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{ matrix.otp }} | |
- name: BUILD | |
run: | | |
ERLANG_HOME="$(dirname $(dirname $(which erl)))" | |
bazelisk build //... \ | |
--noenable_bzlmod \ | |
--color=yes | |
build-bzlmod: | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
otp: | |
- "25.3" | |
- "26.0" | |
steps: | |
- name: CHECKOUT | |
uses: actions/checkout@v4 | |
- name: CONFIGURE ERLANG | |
uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{ matrix.otp }} | |
- name: BUILD | |
run: | | |
ERLANG_HOME="$(dirname $(dirname $(which erl)))" | |
bazelisk build //... \ | |
--color=yes | |
test: | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
otp: | |
- "25.3" | |
- "26.0" | |
steps: | |
- name: CHECKOUT | |
uses: actions/checkout@v4 | |
- name: CONFIGURE ERLANG | |
uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{ matrix.otp }} | |
- name: TEST | |
working-directory: test | |
run: | | |
ERLANG_HOME="$(dirname $(dirname $(which erl)))" | |
bazelisk test //... \ | |
--noenable_bzlmod \ | |
--color=yes | |
- name: RESOVLE TEST LOGS PATH | |
if: always() | |
working-directory: test | |
run: | | |
echo "::set-output name=LOGS_PATH::$(readlink -f bazel-testlogs)" | |
id: resolve-test-logs-path | |
- name: CAPTURE TEST LOGS | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: bazel-testlogs-${{matrix.otp}} | |
path: ${{ steps.resolve-test-logs-path.outputs.LOGS_PATH }}/* | |
test-windows: | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
otp: | |
- "25.3" | |
- "26.0" | |
steps: | |
- name: CHECKOUT | |
uses: actions/checkout@v4 | |
- name: CONFIGURE ERLANG | |
uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{ matrix.otp }} | |
- name: CONFIGURE BAZEL | |
working-directory: test | |
shell: bash | |
run: | | |
cat << EOF >> user.bazelrc | |
startup --output_user_root=C:/tmp | |
startup --windows_enable_symlinks | |
build --enable_runfiles | |
build --color=yes | |
build --@rules_erlang//:ct_test_windows_logdir_drive_letter=z | |
build --jobs=1 | |
EOF | |
- name: TEST | |
working-directory: test | |
shell: cmd | |
run: | | |
where erl > tmpFile | |
set /p ERL_PATH= < tmpFile | |
del tmpFile | |
set ERLANG_HOME=%ERL_PATH:\bin\erl.exe=% | |
bazelisk test //... --noenable_bzlmod | |
- name: RESOVLE TEST LOGS PATH | |
if: always() | |
working-directory: test | |
shell: bash | |
run: | | |
LOGS_TAR=$PWD/logs.tar | |
cd bazel-testlogs | |
tar -cf $LOGS_TAR * | |
- name: CAPTURE TEST LOGS | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: bazel-testlogs-windows-${{matrix.otp}} | |
path: test/logs.tar | |
test-bzlmod: | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
otp: | |
- "25.3" | |
- "26.0" | |
steps: | |
- name: CHECKOUT | |
uses: actions/checkout@v4 | |
- name: CONFIGURE ERLANG | |
uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{ matrix.otp }} | |
- name: TEST | |
working-directory: test | |
run: | | |
bazelisk test //... | |
- name: RESOVLE TEST LOGS PATH | |
if: always() | |
working-directory: test | |
run: | | |
echo "::set-output name=LOGS_PATH::$(readlink -f bazel-testlogs)" | |
id: resolve-test-logs-path | |
- name: CAPTURE TEST LOGS | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: bazel-testlogs-bzlmod-${{matrix.otp}} | |
path: ${{ steps.resolve-test-logs-path.outputs.LOGS_PATH }}/* | |
test-bzlmod-windows: | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
otp: | |
- "25.3" | |
steps: | |
- name: CHECKOUT | |
uses: actions/checkout@v4 | |
- name: CONFIGURE ERLANG | |
uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{ matrix.otp }} | |
- name: CONFIGURE BAZEL | |
working-directory: test | |
shell: bash | |
run: | | |
cat << EOF >> user.bazelrc | |
startup --output_user_root=C:/tmp | |
startup --windows_enable_symlinks | |
build --enable_runfiles | |
build --color=yes | |
build --@rules_erlang//:ct_test_windows_logdir_drive_letter=z | |
build --jobs=1 | |
EOF | |
- name: TEST | |
working-directory: test | |
shell: cmd | |
run: | | |
bazelisk test //... | |
- name: RESOVLE TEST LOGS PATH | |
if: always() | |
working-directory: test | |
shell: bash | |
run: | | |
LOGS_TAR=$PWD/logs.tar | |
cd bazel-testlogs | |
tar -cf $LOGS_TAR * | |
- name: CAPTURE TEST LOGS | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: bazel-testlogs-bzlmod-windows-${{matrix.otp}} | |
path: test/logs.tar | |
test-bzlmod-internal-erlang: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: CHECKOUT | |
uses: actions/checkout@v4 | |
- name: CONFIGURE BAZEL | |
working-directory: test | |
run: | | |
cat << EOF >> user.bazelrc | |
build:buildbuddy --remote_download_minimal | |
build:buildbuddy --color=yes | |
EOF | |
- name: BUILD | |
working-directory: test | |
run: | | |
bazelisk build @rules_erlang//tools:erlang_headers \ | |
--config=rbe \ | |
--toolchain_resolution_debug="@rules_erlang.*" \ | |
--verbose_failures | |
- name: TEST | |
working-directory: test | |
run: | | |
bazelisk test //... \ | |
--config=rbe \ | |
--toolchain_resolution_debug="@rules_erlang.*" \ | |
--verbose_failures | |
- name: RESOVLE TEST LOGS PATH | |
if: always() | |
working-directory: test | |
run: | | |
echo "::set-output name=LOGS_PATH::$(readlink -f bazel-testlogs)" | |
id: resolve-test-logs-path | |
- name: CAPTURE TEST LOGS | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: bazel-testlogs-bzlmod-internal-erlang | |
path: ${{ steps.resolve-test-logs-path.outputs.LOGS_PATH }}/* | |
test-host-erlang-change-detected: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: CHECKOUT | |
uses: actions/checkout@v4 | |
- name: CONFIGURE ERLANG | |
uses: erlef/setup-beam@v1 | |
with: | |
otp-version: "25.0" | |
- name: BUILD | |
working-directory: test | |
id: before | |
run: | | |
bazelisk build :otp_version \ | |
--color=yes | |
echo "otp=$(cat bazel-bin/otp_version.txt)" >> $GITHUB_OUTPUT | |
- name: CONFIGURE ERLANG | |
uses: erlef/setup-beam@v1 | |
with: | |
otp-version: "24.3" | |
- name: BUILD | |
working-directory: test | |
id: after | |
run: | | |
bazelisk build :otp_version \ | |
--color=yes | |
echo "otp=$(cat bazel-bin/otp_version.txt)" >> $GITHUB_OUTPUT | |
- name: CHECK | |
run: | | |
set -x | |
if [[ "${{ steps.before.outputs.otp }}" == "${{ steps.after.outputs.otp }}" ]]; then | |
echo "Fail" | |
fi | |
test-gazelle-extension: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: CHECKOUT | |
uses: actions/checkout@v4 | |
- name: CONFIGURE ERLANG | |
uses: erlef/setup-beam@v1 | |
with: | |
otp-version: 26 | |
- name: TEST GAZELLE PACKAGE | |
working-directory: test | |
run: | | |
cat << EOF >> user.bazelrc | |
build --color=yes | |
EOF | |
bazelisk test //gazelle:unit_suite | |
bazelisk test //gazelle:integration_suite \ | |
|| bazelisk test //gazelle:integration_suite | |
- name: RESOVLE TEST LOGS PATH | |
if: always() | |
working-directory: test | |
run: | | |
echo "::set-output name=LOGS_PATH::$(readlink -f bazel-testlogs)" | |
id: resolve-test-logs-path | |
- name: CAPTURE TEST LOGS | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: bazel-testlogs-gazelle | |
path: ${{ steps.resolve-test-logs-path.outputs.LOGS_PATH }}/* | |
summary: | |
needs: | |
- build | |
- build-bzlmod | |
- test | |
- test-windows | |
- test-bzlmod | |
- test-bzlmod-windows | |
- test-bzlmod-internal-erlang | |
- test-host-erlang-change-detected | |
- test-gazelle-extension | |
runs-on: ubuntu-latest | |
steps: | |
- name: SUMMARY | |
run: | | |
echo "SUCCESS" |