Skip to content

Commit

Permalink
ci: add more archs
Browse files Browse the repository at this point in the history
ci: change to cross
ci: more fixes on arch and ignore riscv
ci: Riscv dont work well with ring 0.16.20
ci: strict test
  • Loading branch information
sandhilt committed Oct 4, 2024
1 parent 17ed4c4 commit 82d2a65
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 10 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ jobs:
- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Setup Cache
uses: Swatinem/rust-cache@v2

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

Expand All @@ -58,7 +55,7 @@ jobs:
- name: Linux-arm64
runner: ubuntu-latest
target: aarch64-unknown-linux-gnu
command: cargo
command: cross
- name: MacOS-amd64
runner: macos-latest
target: x86_64-apple-darwin
Expand All @@ -76,7 +73,7 @@ jobs:
- uses: actions/checkout@v4

- name: Install requirements (Linux)
if: matrix.runner == 'ubuntu-latest' && matrix.command == 'cargo'
if: matrix.target == 'x86_64-unknown-linux-gnu'
run: |
sudo apt-get update
sudo apt-get install protobuf-compiler
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Rust test

on:
pull_request:
branches: [ "main" ]
branches: ["main"]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -49,6 +49,5 @@ jobs:
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
cargo binstall --no-confirm cross
# TODO: Remove true after fix tests
- name: Test
run: cargo test --workspace --no-fail-fast || true
run: cargo test --workspace --no-fail-fast
11 changes: 9 additions & 2 deletions Cross.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
# add depency for reqwest that use openssl and protobuf for celestia
[target.riscv64gc-unknown-linux-gnu]
image = "ghcr.io/cross-rs/riscv64gc-unknown-linux-gnu:edge"
# add depency for reqwest that use openssl and protobuf for celestia
pre-build = [
"dpkg --add-architecture $CROSS_DEB_ARCH",
"apt-get update && apt-get --assume-yes install libssl-dev:$CROSS_DEB_ARCH protobuf-compiler",
"apt-get update && apt-get --assume-yes install pkg-config libssl-dev:$CROSS_DEB_ARCH protobuf-compiler",
]

[target.aarch64-unknown-linux-gnu]
image = "ghcr.io/cross-rs/aarch64-unknown-linux-gnu:edge"
pre-build = [
"dpkg --add-architecture $CROSS_DEB_ARCH",
"apt-get update && apt-get --assume-yes install pkg-config libssl-dev:$CROSS_DEB_ARCH protobuf-compiler",
]
2 changes: 2 additions & 0 deletions decode-batch/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[build]
rustflags = ["-C", "target-feature=+crt-static"]
3 changes: 3 additions & 0 deletions tripa/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
[env]
RUST_TEST_THREADS = "1"

[build]
rustflags = ["-C", "target-feature=+crt-static"]

0 comments on commit 82d2a65

Please sign in to comment.