From 7c801436dce2548f231ec70087d5e037a2906e57 Mon Sep 17 00:00:00 2001 From: Richard Patel Date: Mon, 8 Jan 2024 20:23:35 +0000 Subject: [PATCH] Build system post-merge fixes - Get Cargo workflow to work again - Remove unused LICENSE allow in deny.toml (tool would report error otherwise) - Fix permissioning in "On Main Push" top-level workflow - Fix argument expansion in ci_tests.sh --- .github/workflows/cargo.yml | 51 +++++++----------------------- .github/workflows/on_main_push.yml | 4 +++ contrib/test/ci_tests.sh | 2 +- ffi/rust/deny.toml | 4 --- 4 files changed, 17 insertions(+), 44 deletions(-) diff --git a/.github/workflows/cargo.yml b/.github/workflows/cargo.yml index 01aff931c27..a2c6b198a11 100644 --- a/.github/workflows/cargo.yml +++ b/.github/workflows/cargo.yml @@ -11,64 +11,37 @@ jobs: if: github.ref == 'refs/heads/main' steps: - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true + - uses: dtolnay/rust-toolchain@stable - name: stage run: bash ffi/rust/firedancer-sys/stage.sh - - uses: actions-rs/cargo@v1 - with: - command: package - args: --allow-dirty --manifest-path ffi/rust/firedancer-sys/Cargo.toml + - run: cargo package --allow-dirty --manifest-path ffi/rust/firedancer-sys/Cargo.toml test: name: cargo-test runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - uses: actions-rs/cargo@v1 - with: - command: test - args: --all + - uses: dtolnay/rust-toolchain@stable + - run: cargo test --all + working-directory: ffi/rust fmt: name: cargo-rustfmt runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: nightly - override: true - components: rustfmt, clippy - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check + - uses: dtolnay/rust-toolchain@stable + - run: cargo fmt --all -- --check + working-directory: ffi/rust clippy: name: cargo-clippy runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: nightly - override: true - components: rustfmt, clippy - - uses: actions-rs/cargo@v1 - with: - command: clippy - args: --all -- -D warnings + - uses: dtolnay/rust-toolchain@stable + - run: cargo clippy --all -- -D warnings + working-directory: ffi/rust cargo-deny: name: cargo-deny @@ -77,4 +50,4 @@ jobs: - uses: actions/checkout@v4 - uses: EmbarkStudios/cargo-deny-action@v1 with: - command: check bans licenses sources + command: --manifest-path ffi/rust/Cargo.toml check bans licenses sources diff --git a/.github/workflows/on_main_push.yml b/.github/workflows/on_main_push.yml index de0c838e908..60ec12379cf 100644 --- a/.github/workflows/on_main_push.yml +++ b/.github/workflows/on_main_push.yml @@ -6,6 +6,10 @@ jobs: book: uses: ./.github/workflows/book.yml secrets: inherit + permissions: + contents: read + pages: write + id-token: write clusterfuzz: uses: ./.github/workflows/clusterfuzz.yml diff --git a/contrib/test/ci_tests.sh b/contrib/test/ci_tests.sh index fd1cb2319d7..bc9502bb2c2 100755 --- a/contrib/test/ci_tests.sh +++ b/contrib/test/ci_tests.sh @@ -26,7 +26,7 @@ set -x # Build and run tests for all machines OBJDIRS=( ) -for MACHINE in "${MACHINES[*]}"; do +for MACHINE in ${MACHINES[*]}; do # TODO hacky OBJDIR="build/$(echo "$MACHINE" | tr "_" "/")" OBJDIRS+=( "${OBJDIR}" ) diff --git a/ffi/rust/deny.toml b/ffi/rust/deny.toml index 3c19e7ce843..863e34c0150 100644 --- a/ffi/rust/deny.toml +++ b/ffi/rust/deny.toml @@ -5,13 +5,9 @@ unused-allowed-license = "deny" allow = [ "MIT", "Apache-2.0", - "BSD-2-Clause", "BSD-3-Clause", - "0BSD", "ISC", "Unicode-DFS-2016", - "MPL-2.0", - "OpenSSL", ] [[licenses.clarify]]