From d0271920a734b8c02186785390e2fdf56624790b Mon Sep 17 00:00:00 2001 From: Jacek Sieka Date: Tue, 22 Nov 2022 17:55:50 +0100 Subject: [PATCH] ci: abort redundant PR builds (#40) * ci: abort redundant PR builds * bump checkouts --- .github/workflows/ci.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9d76d14..cb789f8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,10 @@ on: pull_request: workflow_dispatch: +concurrency: # Cancel stale PR builds (but not push builds) + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true + jobs: build: strategy: @@ -30,7 +34,7 @@ jobs: shell: bash - target: os: macos - builder: macos-10.15 + builder: macos-12 shell: bash - target: os: windows @@ -43,10 +47,10 @@ jobs: name: '${{ matrix.target.os }}-${{ matrix.target.cpu }} (Nim ${{ matrix.branch }})' runs-on: ${{ matrix.builder }} - continue-on-error: ${{ matrix.branch == 'version-1-6' || matrix.branch == 'devel' }} + continue-on-error: ${{ matrix.branch == 'devel' }} steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: submodules: true @@ -103,7 +107,6 @@ jobs: if: > steps.windows-dlls-cache.outputs.cache-hit != 'true' && runner.os == 'Windows' - shell: bash run: | mkdir -p external curl -L "https://nim-lang.org/download/windeps.zip" -o external/windeps.zip @@ -112,9 +115,8 @@ jobs: - name: Path to cached dependencies (Windows) if: > runner.os == 'Windows' - shell: bash run: | - echo '${{ github.workspace }}'"/external/dlls-${{ matrix.target.cpu }}" >> $GITHUB_PATH + echo "${{ github.workspace }}/external/dlls-${{ matrix.target.cpu }}" >> $GITHUB_PATH - name: Derive environment variables run: | @@ -143,8 +145,7 @@ jobs: echo "ncpu=$ncpu" >> $GITHUB_ENV echo "MAKE_CMD=${MAKE_CMD}" >> $GITHUB_ENV - - name: Build Nim and associated tools - shell: bash + - name: Build Nim and Nimble run: | curl -O -L -s -S https://raw.githubusercontent.com/status-im/nimbus-build-system/master/scripts/build_nim.sh env MAKE="${MAKE_CMD} -j${ncpu}" ARCH_OVERRIDE=${PLATFORM} NIM_COMMIT=${{ matrix.branch }} \ @@ -153,9 +154,8 @@ jobs: echo '${{ github.workspace }}/nim/bin' >> $GITHUB_PATH - name: Run tests - shell: bash run: | nim --version nimble --version nimble install -y --depsOnly - env NIMLANG="c" nimble test + env NIMLANG=c nimble test