Skip to content

Commit

Permalink
Merge pull request #4 from Calindra/feat/add-ci-release
Browse files Browse the repository at this point in the history
Add support to generate Linux ARM64
  • Loading branch information
stskeeps authored Oct 9, 2024
2 parents c5d0823 + 174888f commit 89c1494
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
15 changes: 6 additions & 9 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 @@ -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
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 Expand Up @@ -106,7 +103,7 @@ jobs:
shell: bash
run: |
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
cargo binstall --force --no-confirm cross
- name: Copy config
working-directory: tripa
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
9 changes: 4 additions & 5 deletions Cross.toml
Original file line number Diff line number Diff line change
@@ -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",
]
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 89c1494

Please sign in to comment.