Skip to content

Commit

Permalink
Build system post-merge fixes
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
riptl committed Jan 8, 2024
1 parent 18aa7e9 commit 7c80143
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 44 deletions.
51 changes: 12 additions & 39 deletions .github/workflows/cargo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
4 changes: 4 additions & 0 deletions .github/workflows/on_main_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion contrib/test/ci_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}" )
Expand Down
4 changes: 0 additions & 4 deletions ffi/rust/deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]]
Expand Down

0 comments on commit 7c80143

Please sign in to comment.