Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade some CI actions #9466

Merged
merged 8 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 21 additions & 42 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,15 @@ jobs:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: yarn
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
profile: minimal
components: rustfmt
- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@v2
# use `--frozen-lockfile` to fail immediately if the committed yarn.lock needs updates
# https://yarnpkg.com/lang/en/docs/cli/install/#toc-yarn-install-frozen-lockfile
- run: yarn --frozen-lockfile
Expand All @@ -29,8 +28,8 @@ jobs:
name: Flow
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: yarn
- run: yarn --frozen-lockfile
Expand All @@ -53,17 +52,16 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: yarn
node-version: ${{matrix.node}}
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
profile: minimal
components: rustfmt
- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@v2
- name: Bump max inotify watches (Linux only)
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p;
if: ${{matrix.os == 'ubuntu-latest'}}
Expand All @@ -72,7 +70,7 @@ jobs:
- run: yarn test:unit
- name: Upload @parcel/rust Linux Binaries artifact
if: ${{matrix.os == 'ubuntu-latest' && matrix.node == 20}}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Rust Linux Binaries
path: |
Expand All @@ -91,32 +89,23 @@ jobs:
fail-fast: false
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: yarn
node-version: ${{matrix.node}}
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
profile: minimal
components: rustfmt
- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@v2
- name: Bump max inotify watches (Linux only)
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p;
if: ${{matrix.os == 'ubuntu-latest'}}
- run: yarn --frozen-lockfile
- run: yarn build-native-release
- run: yarn build
- run: yarn test:integration-ci
# Similar to
# https://github.com/marketplace/actions/publish-unit-test-results#use-with-matrix-strategy
- name: Upload JUnit results
if: always()
uses: actions/upload-artifact@v2
with:
name: Integration tests (${{matrix.os}}, node ${{matrix.node}})
path: '**/junit-*.xml'

# Deployment steps taken from https://github.com/colinwilson/static-site-to-vercel/blob/master/.github/workflows/deploy-preview.yml
repl_build:
Expand All @@ -126,20 +115,21 @@ jobs:
permissions:
deployments: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: yarn
node-version: 20
- uses: dtolnay/rust-toolchain@stable
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
targets: wasm32-unknown-unknown
- name: Install wasm-opt
run: |
curl -L -O https://github.com/WebAssembly/binaryen/releases/download/version_116/binaryen-version_116-x86_64-linux.tar.gz
tar -xf binaryen-version_116-x86_64-linux.tar.gz
echo "$PWD/binaryen-version_116/bin" >> $GITHUB_PATH
- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@v2
with:
key: wasm
- name: Bump max inotify watches
Expand All @@ -154,7 +144,7 @@ jobs:
- run: yarn build-native-wasm
- run: yarn workspace @parcel/repl build
# - name: Upload REPL
# uses: actions/upload-artifact@v2
# uses: actions/upload-artifact@v4
# with:
# name: REPL
# path: 'packages/dev/repl/dist'
Expand Down Expand Up @@ -187,14 +177,3 @@ jobs:
status: ${{ job.status }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
env_url: ${{ steps.vercel-action.outputs.preview-url }}

test_report:
name: Test report
runs-on: ubuntu-latest
needs: [unit_tests, integration_tests]
if: always()
steps:
- name: Create test report
uses: mikepenz/action-junit-report@v2
with:
report_paths: artifacts/**/*.xml
44 changes: 17 additions & 27 deletions .github/workflows/nightly-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,19 @@ jobs:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
profile: minimal
override: true
- uses: bahmutov/[email protected]
- name: Build native packages
run: yarn build-native-release
- name: Strip debug symbols # https://github.com/rust-lang/rust/issues/46034
if: ${{ matrix.os == 'macos-latest' }}
run: strip -x packages/*/*/*.node # Must use -x on macOS. This produces larger results on linux.
- name: Upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: bindings-${{ matrix.os }}
path: packages/*/*/*.node
Expand All @@ -41,22 +39,20 @@ jobs:
container:
image: docker.io/mischnic/centos7-node16
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install yarn
run: npm install --global yarn@1
- name: Install Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
profile: minimal
override: true
- uses: bahmutov/[email protected]
- name: Build native packages
run: yarn build-native-release
- name: Strip debug symbols # https://github.com/rust-lang/rust/issues/46034
run: strip packages/*/*/*.node
- name: Upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: bindings-linux-gnu-x64
path: packages/*/*/*.node
Expand All @@ -81,13 +77,11 @@ jobs:
name: ${{ matrix.target }}
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
profile: minimal
override: true
target: ${{ matrix.target }}
- name: Install cross compile toolchains
run: |
Expand All @@ -102,7 +96,7 @@ jobs:
- name: Strip debug symbols # https://github.com/rust-lang/rust/issues/46034
run: ${{ matrix.strip }} packages/*/*/*.node
- name: Upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: bindings-${{ matrix.target }}
path: packages/*/*/*.node
Expand Down Expand Up @@ -136,15 +130,13 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install build tools
run: apk add --no-cache python3 make gcc g++ musl-dev curl
- name: Install Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
profile: minimal
override: true
target: ${{ matrix.target }}
- uses: bahmutov/[email protected]
- name: Build native packages
Expand All @@ -155,7 +147,7 @@ jobs:
- name: Strip debug symbols # https://github.com/rust-lang/rust/issues/46034
run: ${{ matrix.strip }} packages/*/*/*.node
- name: Upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: bindings-linux-musl
path: packages/*/*/*.node
Expand All @@ -169,13 +161,11 @@ jobs:
name: aarch64-apple-darwin
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
profile: minimal
override: true
target: aarch64-apple-darwin
- uses: bahmutov/[email protected]
- name: Build native packages
Expand All @@ -188,7 +178,7 @@ jobs:
- name: Strip debug symbols
run: strip -x packages/*/*/*.node
- name: Upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: bindings-apple-aarch64
path: packages/*/*/*.node
Expand All @@ -204,14 +194,14 @@ jobs:
- build-linux-gnu-arm
- build-apple-silicon
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: bahmutov/[email protected]
- name: Build native packages
run: yarn build-native-release
- name: Download artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Move artifacts
Expand Down
Loading