From 16a2c2925eb46e24208b20bca567f1e7546f4e2f Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Sat, 8 Apr 2023 18:57:54 +0200 Subject: [PATCH 1/6] chore: automatically cancel superseded Actions runs (#5) --- .github/workflows/check.yml | 4 ++++ .github/workflows/nostd.yml | 4 ++++ .github/workflows/safety.yml | 4 ++++ .github/workflows/scheduled.yml | 4 ++++ .github/workflows/test.yml | 4 ++++ 5 files changed, 20 insertions(+) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index a687dfa..3fb97ad 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -4,6 +4,10 @@ on: push: branches: [main] pull_request: +# Spend CI time only on latest ref: https://github.com/jonhoo/rust-ci-conf/pull/5 +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true name: check jobs: fmt: diff --git a/.github/workflows/nostd.yml b/.github/workflows/nostd.yml index 7efae0f..32d56c3 100644 --- a/.github/workflows/nostd.yml +++ b/.github/workflows/nostd.yml @@ -4,6 +4,10 @@ on: push: branches: [main] pull_request: +# Spend CI time only on latest ref: https://github.com/jonhoo/rust-ci-conf/pull/5 +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true name: no-std jobs: nostd: diff --git a/.github/workflows/safety.yml b/.github/workflows/safety.yml index edf40e5..9c7aeee 100644 --- a/.github/workflows/safety.yml +++ b/.github/workflows/safety.yml @@ -4,6 +4,10 @@ on: push: branches: [main] pull_request: +# Spend CI time only on latest ref: https://github.com/jonhoo/rust-ci-conf/pull/5 +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true name: safety jobs: sanitizers: diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index 0215432..d4e19dd 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -6,6 +6,10 @@ on: pull_request: schedule: - cron: '7 7 * * *' +# Spend CI time only on latest ref: https://github.com/jonhoo/rust-ci-conf/pull/5 +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true name: rolling jobs: # https://twitter.com/mycoliza/status/1571295690063753218 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c675b38..4d0417c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,6 +4,10 @@ on: push: branches: [main] pull_request: +# Spend CI time only on latest ref: https://github.com/jonhoo/rust-ci-conf/pull/5 +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true name: test jobs: required: From 6332a3af21a58f811a681a98cd44d0f5da8a1891 Mon Sep 17 00:00:00 2001 From: Jon Gjengset Date: Mon, 24 Apr 2023 12:40:14 -0700 Subject: [PATCH 2/6] [sanity] More robust injection of opt-level 1 (#9) Fixes #8 --- .github/workflows/safety.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/safety.yml b/.github/workflows/safety.yml index 9c7aeee..eb5a5d6 100644 --- a/.github/workflows/safety.yml +++ b/.github/workflows/safety.yml @@ -23,8 +23,15 @@ jobs: sudo apt install llvm # to fix buggy leak analyzer: # https://github.com/japaric/rust-san#unrealiable-leaksanitizer - sed -i '/\[features\]/i [profile.dev]' Cargo.toml - sed -i '/profile.dev/a opt-level = 1' Cargo.toml + # ensure there's a profile.dev section + if ! grep -qE '^[ \t]*[profile.dev]' Cargo.toml; then + echo >> Cargo.toml + echo '[profile.dev]' >> Cargo.toml + fi + # remove pre-existing opt-levels in profile.dev + sed -i '/^\s*\[profile.dev\]/,/^\s*\[/ {/^\s*opt-level/d}' Cargo.toml + # now set opt-level to 1 + sed -i '/^\s*\[profile.dev\]/a opt-level = 1' Cargo.toml cat Cargo.toml name: Enable debug symbols - name: cargo test -Zsanitizer=address From 99f108f93c4f09906a4ddd4506fa4a2cbc68169d Mon Sep 17 00:00:00 2001 From: James Chacon Date: Sun, 13 Aug 2023 03:13:38 -0700 Subject: [PATCH 3/6] Quote MSRV version to avoid float parsing (#11) Put 1.70 in there (for instance if you want to pin against OnceLock stabilizing) and it will actually test 1.7 as it appears github auto converts this to a float? Putting in quotes seems to do the right thing here --- .github/workflows/check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 3fb97ad..6b136dc 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -79,7 +79,7 @@ jobs: # https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability strategy: matrix: - msrv: [1.56.1] # 2021 edition requires 1.56 + msrv: ["1.56.1"] # 2021 edition requires 1.56 name: ubuntu / ${{ matrix.msrv }} steps: - uses: actions/checkout@v3 From c704bcc656871d37f93f79234c4d530522ac8733 Mon Sep 17 00:00:00 2001 From: Rod Elias Date: Sun, 20 Aug 2023 09:40:15 -0300 Subject: [PATCH 4/6] Install Openssl for Windows (#12) --- .github/workflows/test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4d0417c..9389fd3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -58,6 +58,10 @@ jobs: matrix: os: [macos-latest, windows-latest] steps: + - run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append + if: runner.os == 'Windows' + - run: vcpkg install openssl:x64-windows-static-md + if: runner.os == 'Windows' - uses: actions/checkout@v3 with: submodules: true From 7c327ddf5b42f5309f564da8275c789c4a22fdbb Mon Sep 17 00:00:00 2001 From: Jon Gjengset Date: Sun, 20 Aug 2023 15:12:25 +0200 Subject: [PATCH 5/6] Don't install OpenSSL on Windows by default --- .github/workflows/test.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9389fd3..3ef2713 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -58,10 +58,12 @@ jobs: matrix: os: [macos-latest, windows-latest] steps: - - run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append - if: runner.os == 'Windows' - - run: vcpkg install openssl:x64-windows-static-md - if: runner.os == 'Windows' + # if your project needs OpenSSL, uncommment this to fix Windows builds. + # it's commented out by default as tthe install command takes 5-10m. + # - run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append + # if: runner.os == 'Windows' + # - run: vcpkg install openssl:x64-windows-static-md + # if: runner.os == 'Windows' - uses: actions/checkout@v3 with: submodules: true From deb9fd3f46de5eebd2583292362a161b1d1c56c4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 9 Sep 2023 16:21:14 +0200 Subject: [PATCH 6/6] Bump actions/checkout from 3 to 4 (#13) Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/check.yml | 10 +++++----- .github/workflows/nostd.yml | 2 +- .github/workflows/safety.yml | 6 +++--- .github/workflows/scheduled.yml | 4 ++-- .github/workflows/test.yml | 8 ++++---- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 6b136dc..3fdc139 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest name: stable / fmt steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - name: Install stable @@ -34,7 +34,7 @@ jobs: matrix: toolchain: [stable, beta] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - name: Install ${{ matrix.toolchain }} @@ -50,7 +50,7 @@ jobs: runs-on: ubuntu-latest name: nightly / doc steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - name: Install nightly @@ -63,7 +63,7 @@ jobs: runs-on: ubuntu-latest name: ubuntu / stable / features steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - name: Install stable @@ -82,7 +82,7 @@ jobs: msrv: ["1.56.1"] # 2021 edition requires 1.56 name: ubuntu / ${{ matrix.msrv }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - name: Install ${{ matrix.msrv }} diff --git a/.github/workflows/nostd.yml b/.github/workflows/nostd.yml index 32d56c3..00362a6 100644 --- a/.github/workflows/nostd.yml +++ b/.github/workflows/nostd.yml @@ -17,7 +17,7 @@ jobs: matrix: target: [thumbv7m-none-eabi, aarch64-unknown-none] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - name: Install stable diff --git a/.github/workflows/safety.yml b/.github/workflows/safety.yml index eb5a5d6..ce1e38e 100644 --- a/.github/workflows/safety.yml +++ b/.github/workflows/safety.yml @@ -13,7 +13,7 @@ jobs: sanitizers: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - name: Install nightly @@ -49,7 +49,7 @@ jobs: miri: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - run: | @@ -66,7 +66,7 @@ jobs: loom: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - name: Install stable diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index d4e19dd..4607f3e 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest name: ubuntu / nightly steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - name: Install nightly @@ -36,7 +36,7 @@ jobs: # Unfortunately, hashFiles only works in if on steps, so we reepeat it. # if: hashFiles('Cargo.lock') != '' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - name: Install beta diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3ef2713..56bd560 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,7 +17,7 @@ jobs: matrix: toolchain: [stable, beta] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - name: Install ${{ matrix.toolchain }} @@ -37,7 +37,7 @@ jobs: runs-on: ubuntu-latest name: ubuntu / stable / minimal-versions steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - name: Install stable @@ -64,7 +64,7 @@ jobs: # if: runner.os == 'Windows' # - run: vcpkg install openssl:x64-windows-static-md # if: runner.os == 'Windows' - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - name: Install stable @@ -78,7 +78,7 @@ jobs: runs-on: ubuntu-latest name: ubuntu / stable / coverage steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - name: Install stable