From e9f688ff62b8572101f873d392366c5f685a3422 Mon Sep 17 00:00:00 2001 From: sandhilt <6170125+sandhilt@users.noreply.github.com> Date: Thu, 3 Oct 2024 19:09:27 -0300 Subject: [PATCH] ci: add more archs 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 --- .github/workflows/release.yml | 13 +++++-------- .github/workflows/rust.yml | 5 ++--- Cross.toml | 9 ++++----- decode-batch/.cargo/config.toml | 2 ++ tripa/.cargo/config.toml | 3 +++ 5 files changed, 16 insertions(+), 16 deletions(-) create mode 100644 decode-batch/.cargo/config.toml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 048f4b6..cca023a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 @@ -55,10 +52,10 @@ jobs: # runner: ubuntu-latest # target: riscv64gc-unknown-linux-gnu # command: cross - # - name: Linux-arm64 - # runner: ubuntu-latest - # target: aarch64-unknown-linux-gnu - # command: cross + - name: Linux-arm64 + runner: ubuntu-latest + target: aarch64-unknown-linux-gnu + command: cross - name: MacOS-amd64 runner: macos-latest target: x86_64-apple-darwin @@ -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 diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 16e2abe..7b34150 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -2,7 +2,7 @@ name: Rust test on: pull_request: - branches: [ "main" ] + branches: ["main"] concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -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 diff --git a/Cross.toml b/Cross.toml index 360f99e..3395703 100644 --- a/Cross.toml +++ b/Cross.toml @@ -1,15 +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" -# 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", +] \ No newline at end of file diff --git a/decode-batch/.cargo/config.toml b/decode-batch/.cargo/config.toml new file mode 100644 index 0000000..fac678a --- /dev/null +++ b/decode-batch/.cargo/config.toml @@ -0,0 +1,2 @@ +[build] +rustflags = ["-C", "target-feature=+crt-static"] diff --git a/tripa/.cargo/config.toml b/tripa/.cargo/config.toml index 8af59dd..9518b12 100644 --- a/tripa/.cargo/config.toml +++ b/tripa/.cargo/config.toml @@ -1,2 +1,5 @@ [env] RUST_TEST_THREADS = "1" + +[build] +rustflags = ["-C", "target-feature=+crt-static"]