Skip to content

Commit

Permalink
add truss-transfer-cli-release ci
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfeil committed Jan 19, 2025
1 parent 0b13ba9 commit c90bfd6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
25 changes: 16 additions & 9 deletions .github/workflows/truss-transfer-cli-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,19 @@ defaults:

jobs:
build-and-upload-cli:
name: Build and Upload CLI Binary
runs-on: ubuntu-latest
name: Build and Upload CLI Binaries
strategy:
matrix:
os: [ubuntu-22.04]
target:
- x86_64-unknown-linux-musl
- aarch64-unknown-linux-musl
# - i686-unknown-linux-musl
# - armv7-unknown-linux-musleabihf
# - powerpc64le-unknown-linux-musl
runs-on: ${{ matrix.os }}
env:
VERSION: ${{ github.ref_name }} # or ${GITHUB_REF##*/}, see note below
OS: linux
ARCH: x86_64
NAME: truss-transfer-cli-${{ github.ref_name }}-linux-${{ matrix.target }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
Expand All @@ -36,20 +43,20 @@ jobs:
components: rust-src

- name: Add musl Target
run: rustup target add x86_64-unknown-linux-musl
run: rustup target add ${{ matrix.target }}

- name: Build Statically Linked CLI Binary
run: |
cargo build --release --target x86_64-unknown-linux-musl --features cli --bin truss_transfer_cli
cargo build --release --target ${{ matrix.target }} --features cli --bin truss_transfer_cli
mkdir -p dist/cli
cp target/x86_64-unknown-linux-musl/release/truss_transfer_cli dist/cli/truss_transfer_cli-${VERSION}-${OS}-${ARCH}
cp target/${{ matrix.target }}/release/truss_transfer_cli dist/cli/${{ env.NAME }}
- name: Test CLI Binary
run: |
sudo mkdir -p /bptr
sudo chown $(whoami):$(whoami) /bptr
cp ./example-bptr-manifest.json /bptr/bptr-manifest
dist/cli/truss_transfer_cli-${VERSION}-${OS}-${ARCH} ./example_bptr_resolved
dist/cli/${{ env.NAME }} ./example_bptr_resolved
if [ ! -d "./example_bptr_resolved" ]; then
echo "❌ Test failed: output directory not created."
exit 1
Expand Down
2 changes: 1 addition & 1 deletion truss-transfer/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion truss-transfer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "truss_transfer"
version = "0.0.1-rc3"
version = "0.0.1-rc4"
edition = "2021"

[lib]
Expand Down

0 comments on commit c90bfd6

Please sign in to comment.