From 8b3aa7600b92c170e56c26c7b68f28158df76549 Mon Sep 17 00:00:00 2001 From: Onur Gündüz Date: Tue, 29 Sep 2026 17:32:03 +0200 Subject: Use stable Rust releases and disable standalone CI --- .github/workflows/ci.yml | 58 --------------------------------------- .github/workflows/ci.yml.disabled | 58 +++++++++++++++++++++++++++++++++++++++ .github/workflows/release.yml | 20 +++++++++----- 3 files changed, 71 insertions(+), 65 deletions(-) delete mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/ci.yml.disabled (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 0dc642b..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: CI - -on: - push: - pull_request: - workflow_dispatch: - workflow_call: - -permissions: - contents: read - -jobs: - test: - name: Test (${{ matrix.os }}, Rust ${{ matrix.rust }}) - runs-on: ${{ matrix.os }} - timeout-minutes: 20 - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - rust: ["1.88.0", stable] - steps: - - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 - with: - persist-credentials: false - - name: Install Rust - run: rustup toolchain install ${{ matrix.rust }} --profile minimal - - name: Test default dependencies - run: cargo +${{ matrix.rust }} test --locked - - name: Test arbitrary-precision JSON compatibility - run: cargo +${{ matrix.rust }} test --locked --features serde_json/arbitrary_precision - - name: Test release build - run: cargo +${{ matrix.rust }} test --release --locked - - quality: - runs-on: ubuntu-latest - timeout-minutes: 20 - steps: - - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 - with: - persist-credentials: false - - name: Install Rust tools - run: rustup toolchain install stable --profile minimal --component rustfmt --component clippy - - name: Test release automation - run: python3 -B -m unittest discover -s scripts -p 'test_*.py' - - name: Check formatting - run: cargo +stable fmt --all -- --check - - name: Check lints - run: cargo +stable clippy --all-targets --locked -- -D warnings - - name: Check feature compatibility lints - run: cargo +stable clippy --all-targets --locked --features serde_json/arbitrary_precision -- -D warnings - - name: Verify package - run: cargo +stable package --locked - - name: Test packaged crate - shell: bash - run: | - package=$(cargo +stable metadata --no-deps --format-version 1 | python3 -c 'import json, sys; p = json.load(sys.stdin)["packages"][0]; print(p["name"] + "-" + p["version"])') - cargo +stable test --locked --manifest-path "target/package/$package/Cargo.toml" diff --git a/.github/workflows/ci.yml.disabled b/.github/workflows/ci.yml.disabled new file mode 100644 index 0000000..ad4403e --- /dev/null +++ b/.github/workflows/ci.yml.disabled @@ -0,0 +1,58 @@ +name: CI + +on: + push: + pull_request: + workflow_dispatch: + workflow_call: + +permissions: + contents: read + +jobs: + test: + name: Test (${{ matrix.os }}, Rust ${{ matrix.rust }}) + runs-on: ${{ matrix.os }} + timeout-minutes: 20 + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + rust: [stable] + steps: + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 + with: + persist-credentials: false + - name: Install Rust + run: rustup toolchain install ${{ matrix.rust }} --profile minimal + - name: Test default dependencies + run: cargo +${{ matrix.rust }} test --locked + - name: Test arbitrary-precision JSON compatibility + run: cargo +${{ matrix.rust }} test --locked --features serde_json/arbitrary_precision + - name: Test release build + run: cargo +${{ matrix.rust }} test --release --locked + + quality: + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 + with: + persist-credentials: false + - name: Install Rust tools + run: rustup toolchain install stable --profile minimal --component rustfmt --component clippy + - name: Test release automation + run: python3 -B -m unittest discover -s scripts -p 'test_*.py' + - name: Check formatting + run: cargo +stable fmt --all -- --check + - name: Check lints + run: cargo +stable clippy --all-targets --locked -- -D warnings + - name: Check feature compatibility lints + run: cargo +stable clippy --all-targets --locked --features serde_json/arbitrary_precision -- -D warnings + - name: Verify package + run: cargo +stable package --locked + - name: Test packaged crate + shell: bash + run: | + package=$(cargo +stable metadata --no-deps --format-version 1 | python3 -c 'import json, sys; p = json.load(sys.stdin)["packages"][0]; print(p["name"] + "-" + p["version"])') + cargo +stable test --locked --manifest-path "target/package/$package/Cargo.toml" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 691e2f5..d046350 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,7 +27,7 @@ defaults: shell: bash env: - RELEASE_RUST: "1.88.0" + RELEASE_RUST: stable jobs: prepare: @@ -54,6 +54,8 @@ jobs: run: rustup toolchain install "$RELEASE_RUST" --profile minimal - name: Select release toolchain run: rustup override set "$RELEASE_RUST" + - name: Test release automation + run: python3 -B -m unittest discover -s scripts -p 'test_*.py' - name: Prepare version and source bundle id: version env: @@ -70,10 +72,6 @@ jobs: retention-days: 7 overwrite: true - checks: - needs: prepare - uses: ./.github/workflows/ci.yml - build: needs: prepare runs-on: ${{ matrix.os }} @@ -84,10 +82,16 @@ jobs: include: - os: ubuntu-24.04 target: x86_64-unknown-linux-musl + binary: aif - os: macos-15 target: aarch64-apple-darwin + binary: aif + - os: windows-latest + target: x86_64-pc-windows-msvc + binary: aif.exe env: TARGET: ${{ matrix.target }} + BINARY: ${{ matrix.binary }} VERSION: ${{ needs.prepare.outputs.version }} RELEASE_COMMIT: ${{ needs.prepare.outputs.commit }} steps: @@ -118,7 +122,7 @@ jobs: - name: Build and check CLI run: | cargo build --release --locked --target "$TARGET" - binary="target/$TARGET/release/aif" + binary="target/$TARGET/release/$BINARY" test "$("$binary" --version)" = "aif $VERSION" printf '{"n":1}\n{"n":2}\n' | "$binary" 'n > 1' > target/smoke.jsonl printf '{"n":2}\n' > target/expected.jsonl @@ -132,6 +136,7 @@ jobs: exit 1 fi - name: Archive CLI + if: runner.os != 'Windows' run: | mkdir -p target/release-dist COPYFILE_DISABLE=1 tar -czf "target/release-dist/aif-v$VERSION-$TARGET.tar.gz" \ @@ -143,6 +148,7 @@ jobs: cargo test --locked --manifest-path "target/package/aif-$VERSION/Cargo.toml" cp "target/package/aif-$VERSION.crate" target/release-dist/ - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 + if: runner.os != 'Windows' with: name: release-assets-${{ matrix.target }} path: target/release-dist/* @@ -152,7 +158,7 @@ jobs: overwrite: true publish: - needs: [prepare, checks, build] + needs: [prepare, build] runs-on: ubuntu-24.04 timeout-minutes: 15 permissions: -- cgit v1.3.1