Skip to content

Commit

Permalink
ci: include conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
YOU54F committed May 9, 2024
1 parent d608bc5 commit f70309e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,22 +68,22 @@ jobs:


- name: Set up QEMU
if: ${{ matrix.docker == true }} && ${{ matrix.alpine == true }} && ${{ matrix.arch == 'aarch64' }}
if: ${{ matrix.docker == 'true' }} && ${{ matrix.alpine == 'true' }} && ${{ matrix.arch == 'arm64' }}
uses: docker/setup-qemu-action@v3

- if: ${{ matrix.docker == true }} && ${{ matrix.alpine == true }}
- if: ${{ matrix.docker == 'true' }} && ${{ matrix.alpine == 'true' }}
name: prebuild linux ${{ matrix.arch }} musl
run: docker run -v $PWD:/home --platform linux/${{ matrix.arch }} -e CIRRUS_CI=true --rm node:20-alpine bin/sh -c 'apk add bash && cd /home && bash -c "/home/script/ci/prebuild-alpine.sh" && rm -rf ffi node_modules'

- if: ${{ matrix.docker == true }} && ${{ matrix.alpine == false }}
- if: ${{ matrix.docker == 'true' }} && ${{ matrix.alpine != 'true' }}
name: prebuild linux ${{ matrix.arch }}
run: docker run -v $PWD:/home --platform linux/${{ matrix.arch }} -e CIRRUS_CI=true --rm node:20 bin/sh -c 'cd /home && /home/script/ci/prebuild-alpine.sh && rm -rf ffi node_modules'

- run: sudo chown -R $(id -u):$(id -g) prebuilds
if: ${{ matrix.docker == true }}
if: ${{ matrix.docker == 'true' }}

- run: ./script/ci/prebuild.sh
if: ${{ matrix.docker != true }}
if: ${{ matrix.docker != 'true' }}

- name: Upload prebuild for ${{ runner.os }}-${{ runner.arch }}
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -148,26 +148,26 @@ jobs:
run: echo "ONLY_DOWNLOAD_PACT_FOR_WINDOWS=true" >> $GITHUB_ENV

- run: LOG_LEVEL=debug ./script/ci/unpack-and-test.sh
if: ${{ matrix.docker != true }}
if: ${{ matrix.docker != 'true' }}


# Linux aarch64 tests are skipped as QEMU fails when executing the ruby binaries
# Related comment: https://github.com/phusion/passenger/issues/2288#issuecomment-1387625121

- name: Set up QEMU
if: ${{ matrix.docker == true }} && ${{ matrix.alpine == true }} && ${{ matrix.arch == 'arm64' }}
if: ${{ matrix.docker == 'true' }} && ${{ matrix.alpine == 'true' }} && ${{ matrix.arch == 'arm64' }}
uses: docker/setup-qemu-action@v3


- if: ${{ matrix.docker == true }} && ${{ matrix.alpine == false }}
- if: ${{ matrix.docker == 'true' }} && ${{ matrix.alpine != 'true' }}
name: test arm64
run: docker run -v $PWD:/home --platform linux/${{ matrix.arch }} --rm node:20 bin/bash -c 'cd /home && /home/script/ci/unpack-and-test.sh'

- if: ${{ matrix.docker == true }} && ${{ matrix.alpine == true }} && ${{ matrix.arch == 'amd64' }}
- if: ${{ matrix.docker == 'true' }} && ${{ matrix.alpine == 'true' }} && ${{ matrix.arch == 'amd64' }}
name: test linux amd64 musl
run: docker run -v $PWD:/home --platform linux/${{ matrix.arch }} -e CIRRUS_CI=true --rm node:20-alpine bin/sh -c 'apk add bash curl gcompat && cd /home && /home/script/ci/unpack-and-test.sh'

- if: ${{ matrix.docker == true }} && ${{ matrix.alpine == false }} && ${{ matrix.arch == 'arm64' }}
- if: ${{ matrix.docker == 'true' }} && ${{ matrix.alpine == false }} && ${{ matrix.arch == 'arm64' }}
name: test linux arm64 musl
run: docker run -v $PWD:/home --platform linux/${{ matrix.arch }} -e CIRRUS_CI=true --rm node:20-alpine bin/sh -c 'apk add bash curl libc6-compat gcompat && cd /home && /home/script/ci/unpack-and-test.sh'

Expand Down

0 comments on commit f70309e

Please sign in to comment.