From 6d8be0aa9b9b222dba5ac2ce332360f27547dea4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Juli=C3=A1n=20Espina?= Date: Sun, 15 Sep 2024 17:23:48 +0000 Subject: [PATCH] Improve CI concurrency and fix macos release (#3996) --- .github/workflows/pull_request.yml | 4 ++++ .github/workflows/release.yml | 1 + .github/workflows/rust.yml | 10 +++++++--- .github/workflows/test262.yml | 4 ++++ .github/workflows/webassembly.yml | 8 ++++++-- 5 files changed, 22 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 555fdfdd0b..eead0bb011 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -6,6 +6,10 @@ on: - main - releases/** +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: runBenchmark: if: contains(github.event.pull_request.labels.*.name, 'run-benchmark') diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 38b6868c78..30622ebc23 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -104,6 +104,7 @@ jobs: uses: dtolnay/rust-toolchain@stable with: toolchain: stable + targets: ${{ matrix.target }} - name: Build run: cargo build --target ${{ matrix.target }} --verbose --release --locked --bin boa diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 5ce7b99008..5c2f5c4edb 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -12,15 +12,19 @@ on: merge_group: types: [checks_requested] +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + env: - RUSTFLAGS: ${{ github.ref == 'refs/heads/main' && '-D warnings' || '' }} + RUSTFLAGS: ${{ (github.ref == 'refs/heads/main' || github.base_ref == 'main') && '-D warnings' || '' }} jobs: coverage: name: Coverage runs-on: ubuntu-latest timeout-minutes: 60 - if: github.ref == 'refs/heads/main' + if: ${{ github.ref == 'refs/heads/main' || github.base_ref == 'main' }} steps: - name: Checkout repository uses: actions/checkout@v4 @@ -152,7 +156,7 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 60 env: - RUSTDOCFLAGS: ${{ github.ref == 'refs/heads/main' && '-D warnings' || '' }} + RUSTDOCFLAGS: ${{ (github.ref == 'refs/heads/main' || github.base_ref == 'main') && '-D warnings' || '' }} steps: - name: Checkout repository uses: actions/checkout@v4 diff --git a/.github/workflows/test262.yml b/.github/workflows/test262.yml index fe73b5d318..8544db9108 100644 --- a/.github/workflows/test262.yml +++ b/.github/workflows/test262.yml @@ -7,6 +7,10 @@ on: merge_group: types: [checks_requested] +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: run_test262: name: Run the test262 test suite diff --git a/.github/workflows/webassembly.yml b/.github/workflows/webassembly.yml index da877cc98c..b9fb489ff7 100644 --- a/.github/workflows/webassembly.yml +++ b/.github/workflows/webassembly.yml @@ -1,3 +1,5 @@ +name: Webassembly demo + on: pull_request: branches: @@ -10,7 +12,9 @@ on: merge_group: types: [checks_requested] -name: Webassembly demo +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true jobs: check_style: @@ -29,7 +33,7 @@ jobs: timeout-minutes: 60 env: WASM_PACK_PATH: ~/.cargo/bin/wasm-pack - RUSTFLAGS: ${{ github.ref == 'refs/heads/main' && '-Dwarnings' || '' }} + RUSTFLAGS: ${{ (github.ref == 'refs/heads/main' || github.base_ref == 'main') && '-Dwarnings' || '' }} steps: - name: Checkout repository uses: actions/checkout@v4