Skip to content

Commit 3bb50ef

Browse files
lwshangclaude
andauthored
chore: Replace deprecated/paid macOS runners and cargo update (#273)
* chore(ci): replace deprecated/paid macOS runners with free equivalents - Replace removed macos-13-large and macos-14-large (Intel paid) with macos-15-intel (free) in ci.yml and release.yml - Replace removed macos-13-xlarge and macos-14-xlarge (arm64 paid) with macos-14 and macos-15 (free) in ci.yml - Replace macos-14-large with macos-15 (arm64 free) in e2e.yml Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * cargo update * update did path in script * chore: update IC mono-repo dependencies and fix breaking changes - ListProposalInfo renamed to ListProposalInfoRequest (moved to ic-nns-governance-api) - Split now requires a memo field - NnsFunction::canister_and_function() is no longer public; replicate mapping locally - Handle new Action variants: DeregisterKnownNeuron, BlessAlternativeGuestOsVersion, TakeCanisterSnapshot, LoadCanisterSnapshot Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * clippy * chore(ci): simplify e2e workflow by removing dynamic matrix generation Remove the `list_tests` job and `e2e-matrix.py` script. The test matrix is now defined inline, eliminating indirection through a Python script, a job output, and an intermediate env var. Also fixes a latent OS name mismatch (`macos-14-large` vs `macos-15`) that would have broken artifact downloads. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore(ci): replace provision-*-e2e.sh scripts with bats-core/bats-action Use the official cross-platform bats-core/bats-action@4.0.0 instead of hand-rolled provision scripts. This removes the two OS-specific scripts, fixes the arm64 path issue (no more hardcoded /usr/local/lib), and switches _.bash to the modern bats_load_library mechanism. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore(ci): remove all provision-*-build scripts and simplify e2e workflow All provision-*-build scripts were dead weight: the darwin/windows ones were empty, and the linux one installed libudev-dev which is no longer needed (hidapi uses default-features=false, so no udev dependency). Also merge the e2e build and test jobs into one, eliminating the artifact upload/download machinery that was only needed when multiple test jobs shared a single build. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(ci): restore libudev-dev for linux builds hidapi's C build script links against libudev at the system level even with default-features = false, so it doesn't appear in Cargo.lock but is still required on Linux. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 5f7e646 commit 3bb50ef

31 files changed

Lines changed: 3596 additions & 2199 deletions

‎.github/workflows/ci.yml‎

Lines changed: 22 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -4,55 +4,32 @@ on: pull_request
44

55
jobs:
66
ci:
7-
name: ${{ matrix.task.name }} (${{ matrix.os.name }})
8-
runs-on: ${{ matrix.os.name }}
7+
name: ${{ matrix.task.name }} (${{ matrix.os }})
8+
runs-on: ${{ matrix.os }}
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
os:
13-
- name: ubuntu-22.04
14-
family: ubuntu
15-
- name: ubuntu-24.04
16-
family: ubuntu
17-
- name: macos-13-large
18-
family: darwin
19-
- name: macos-14-large
20-
family: darwin
21-
- name: macos-14-xlarge
22-
family: darwin-arm64
23-
- name: macos-15
24-
family: darwin-arm64
25-
- name: windows-2022
26-
family: windows
27-
- name: windows-2025
28-
family: windows
29-
task:
30-
- name: Clippy
31-
command: |
32-
cargo hack clippy --each-feature --no-dev-deps -- -D warnings
33-
cargo clippy --tests --benches -- -D warnings
34-
- name: Test
35-
command: cargo test
12+
os:
13+
- ubuntu-22.04
14+
- ubuntu-24.04
15+
- macos-15-intel
16+
- macos-14
17+
- macos-15
18+
- windows-2022
19+
- windows-2025
20+
task:
21+
- name: Clippy
22+
command: |
23+
cargo hack clippy --each-feature --no-dev-deps -- -D warnings
24+
cargo clippy --tests --benches -- -D warnings
25+
- name: Test
26+
command: cargo test
3627
include:
37-
- os:
38-
family: ubuntu
39-
build_deps: scripts/workflows/provision-linux-build.sh
40-
- os:
41-
family: darwin
42-
build_deps: scripts/workflows/provision-darwin-build.sh
43-
- os:
44-
family: darwin-arm64
45-
build_deps: scripts/workflows/provision-darwin-arm64-build.sh
46-
- os:
47-
family: windows
48-
build_deps: scripts/workflows/provision-windows-build.ps1
4928
# formatting doesn't depend on build environment, not included in main matrix
5029
- task:
5130
name: Format
5231
command: cargo fmt -- --check
53-
os:
54-
name: ubuntu-latest
55-
family: ubuntu
32+
os: ubuntu-latest
5633
env:
5734
VCPKG_ROOT: 'C:\vcpkg'
5835
steps:
@@ -65,10 +42,11 @@ jobs:
6542
~/.cargo/git
6643
target
6744
${{ env.VCPKG_ROOT }}
68-
key: ${{ matrix.os.name }}-cargo-${{ hashFiles('**/Cargo.lock', 'rust-toolchain.toml') }}-ci-1
45+
key: ${{ matrix.os }}-cargo-${{ hashFiles('**/Cargo.lock', 'rust-toolchain.toml') }}-ci-1
6946

70-
- name: Install dependencies
71-
run: ${{ matrix.build_deps }}
47+
- name: Install libudev (Linux)
48+
if: ${{ contains(matrix.os, 'ubuntu') }}
49+
run: sudo apt-get install -y libudev-dev
7250

7351
- uses: taiki-e/install-action@v2
7452
with:

‎.github/workflows/e2e.yml‎

Lines changed: 19 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,14 @@ on:
77
pull_request:
88

99
jobs:
10-
build:
11-
name: e2e build (${{ matrix.os }})
10+
test:
11+
name: e2e (${{ matrix.os }})
1212
runs-on: ${{ matrix.os }}
1313
strategy:
1414
fail-fast: false
1515
matrix:
1616
# windows not supported by dfx
17-
include:
18-
- os: ubuntu-22.04
19-
binary_path: target/release
20-
build_deps: scripts/workflows/provision-linux-build.sh
21-
- os: macos-14-large
22-
binary_path: target/release
23-
build_deps: scripts/workflows/provision-darwin-build.sh
17+
os: [ubuntu-22.04, macos-15]
2418
steps:
2519
- uses: actions/checkout@v4
2620

@@ -32,64 +26,30 @@ jobs:
3226
target
3327
key: ${{ matrix.os }}-cargo-${{ hashFiles('**/Cargo.lock', 'rust-toolchain.toml') }}-ci-1
3428

35-
- name: Install dependencies
36-
run: ${{ matrix.build_deps }}
29+
- name: Install libudev (Linux)
30+
if: ${{ contains(matrix.os, 'ubuntu') }}
31+
run: sudo apt-get install -y libudev-dev
3732

3833
- name: Build release
39-
run: cargo build --release --locked
40-
41-
- name: Upload Artifacts
42-
uses: actions/upload-artifact@v4
43-
with:
44-
name: quill-${{ matrix.os }}-rs
45-
path: ${{ matrix.binary_path }}/quill
46-
47-
list_tests:
48-
runs-on: ubuntu-latest
49-
outputs:
50-
matrix: ${{ steps.set-matrix.outputs.matrix }}
51-
steps:
52-
- uses: actions/checkout@v4
53-
- id: set-matrix
5434
run: |
55-
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
56-
echo "matrix<<$EOF" >> $GITHUB_OUTPUT
57-
scripts/workflows/e2e-matrix.py >> $GITHUB_OUTPUT
58-
echo "$EOF" >> $GITHUB_OUTPUT
35+
cargo build --release --locked
36+
echo "$(pwd)/target/release" >> "$GITHUB_PATH"
5937
60-
test:
61-
runs-on: ${{ matrix.os }}
62-
needs: [build, list_tests]
63-
strategy:
64-
fail-fast: false
65-
matrix: ${{fromJson(needs.list_tests.outputs.matrix)}}
66-
env:
67-
E2E_TEST: tests-${{ matrix.test }}.bash
68-
steps:
69-
- uses: actions/checkout@v4
70-
- name: Download quill binary
71-
uses: actions/download-artifact@v4
72-
with:
73-
name: quill-${{ matrix.os }}-rs
74-
path: /usr/local/bin
75-
- name: Setup quill binary
76-
run: chmod +x /usr/local/bin/quill
7738
- name: Install dfx
7839
uses: dfinity/setup-dfx@main
79-
- name: Provision Darwin
40+
41+
- name: Install coreutils (macOS)
8042
if: ${{ contains(matrix.os, 'macos') }}
81-
run: bash scripts/workflows/provision-darwin-e2e.sh
82-
- name: Provision Linux
83-
if: ${{ contains(matrix.os, 'ubuntu') }}
84-
run: bash scripts/workflows/provision-linux-e2e.sh
85-
- name: Prepare environment
86-
run: |
87-
echo "archive=$(pwd)/e2e/archive" >> "$GITHUB_ENV"
88-
echo "assets=$(pwd)/e2e/assets" >> "$GITHUB_ENV"
89-
echo "utils=$(pwd)/e2e/utils" >> "$GITHUB_ENV"
90-
export -p
43+
run: brew install coreutils
44+
45+
- name: Setup Bats and bats libs
46+
id: setup-bats
47+
uses: bats-core/bats-action@4.0.0
48+
9149
- name: Run e2e test
92-
run: timeout 2100 bats "e2e/$E2E_TEST"
50+
env:
51+
BATS_LIB_PATH: ${{ steps.setup-bats.outputs.lib-path }}
52+
run: timeout 2100 bats e2e/tests-quill/create_neuron.bash
9353

9454
aggregate:
9555
name: e2e:required

‎.github/workflows/release.yml‎

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,14 @@ jobs:
2727
name: windows
2828
target_file: target/release/quill.exe
2929
asset_name: quill-windows-x86_64.exe
30-
build_deps: scripts/workflows/provision-windows-build.ps1
31-
- os: macos-13-large
30+
- os: macos-15-intel
3231
name: macos
3332
target_file: target/release/quill
3433
asset_name: quill-macos-x86_64
35-
build_deps: scripts/workflows/provision-darwin-build.sh
36-
- os: macos-13-xlarge
34+
- os: macos-15
3735
name: macos-arm64
3836
target_file: target/release/quill
3937
asset_name: quill-macos-arm64
40-
build_deps: scripts/workflows/provision-darwin-arm64-build.sh
4138
- os: ubuntu-22.04
4239
name: linux-arm32
4340
target: arm-unknown-linux-gnueabihf
@@ -48,7 +45,6 @@ jobs:
4845
name: linux
4946
target_file: target/release/quill
5047
asset_name: quill-linux-x86_64
51-
build_deps: scripts/workflows/provision-linux-build.sh
5248
env:
5349
VCPKG_ROOT: 'C:\vcpkg'
5450
steps:
@@ -62,9 +58,9 @@ jobs:
6258
${{ env.VCPKG_ROOT }}
6359
key: ${{ matrix.os }}-cargo-${{ env.rust }}-release-1
6460

65-
- name: Install dependencies
66-
if: ${{ matrix.build_deps }}
67-
run: ${{ matrix.build_deps }}
61+
- name: Install libudev (Linux)
62+
if: ${{ contains(matrix.os, 'ubuntu') }}
63+
run: sudo apt-get install -y libudev-dev
6864

6965
- name: Install target
7066
if: ${{ matrix.target }}

‎.github/workflows/shellcheck.yml‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ jobs:
1515
| xz -d | tar x
1616
- name: Check e2e scripts
1717
run: $HOME/bin/shellcheck-v0.7.1/shellcheck e2e/**/*.*sh
18-
- name: Check deploy scripts
19-
run: $HOME/bin/shellcheck-v0.7.1/shellcheck scripts/**/*.sh
2018

2119
aggregate:
2220
name: shellcheck:required

0 commit comments

Comments
 (0)