Skip to content

Commit

Permalink
ci: github actions macos m1 (#478)
Browse files Browse the repository at this point in the history
* ci: test macos-14 runner
* ci: test linux arm64 prebuild via docker
* ci: bump deprecated actions
* ci: downgrade artifact actions to v3
  • Loading branch information
YOU54F authored Jan 31, 2024
1 parent af86f1c commit 47cacde
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 60 deletions.
49 changes: 0 additions & 49 deletions .cirrus.yml

This file was deleted.

41 changes: 32 additions & 9 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
create_pre_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: GH_CREATE_PRE_RELEASE=true ./script/ci/release.sh
Expand All @@ -29,18 +29,18 @@ jobs:
fail-fast: false
matrix:
node-version: [20]
os: [macos-latest,ubuntu-latest,windows-latest]
os: [macos-14,macos-12,ubuntu-latest,windows-latest]

env:
NODE_VERSION: ${{ matrix.node-version }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

Expand All @@ -49,6 +49,16 @@ jobs:

- run: ./script/ci/prebuild.sh

- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
if: runner.os == 'Linux'
uses: docker/setup-buildx-action@v3
- if: runner.os == 'Linux'
name: prebuild arm64
run: docker run -v $PWD:/home --platform linux/arm64 --rm node:20 bin/bash -c 'cd /home && /home/script/ci/prebuild.sh'

- name: Upload prebuild for ${{ runner.os }}-${{ runner.arch }}
uses: actions/upload-artifact@v3
with:
Expand All @@ -69,28 +79,41 @@ jobs:
fail-fast: false
matrix:
node-version: [16,18,20]
os: [macos-latest,ubuntu-latest,windows-latest]
os: [macos-14, macos-12, ubuntu-latest,windows-latest]

env:
NODE_VERSION: ${{ matrix.node-version }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Download prebuilds
uses: actions/download-artifact@v3

- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

- if: runner.os == 'Windows'
run: echo "ONLY_DOWNLOAD_PACT_FOR_WINDOWS=true" >> $GITHUB_ENV
- run: ./script/ci/unpack-and-test.sh


# 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: runner.os == 'Linux'
# uses: docker/setup-qemu-action@v3
# - name: Set up Docker Buildx
# if: runner.os == 'Linux'
# uses: docker/setup-buildx-action@v3
# - if: runner.os == 'Linux'
# name: test arm64
# run: docker run -v $PWD:/home --platform linux/arm64 --rm node:20 bin/bash -c 'cd /home && /home/script/ci/unpack-and-test.sh'

release_dry_run:
runs-on: ubuntu-latest
needs: [ create_pre_release, prebuild ]
Expand All @@ -100,12 +123,12 @@ jobs:
NODE_VERSION: 20

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: 'https://registry.npmjs.org'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
NODE_VERSION: 20

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: 'https://registry.npmjs.org'
Expand Down

0 comments on commit 47cacde

Please sign in to comment.