Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor-dependencies, truss transfer cli #1326

Merged
merged 7 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 17 additions & 10 deletions .github/workflows/truss-transfer-cli-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,25 @@ 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

- name: Install musl-tools
run: sudo apt-get update && sudo apt-get install -y musl-tools
run: sudo apt-get update && sudo apt-get install -y musl-tools libssl-dev libatomic-ops-dev

- name: Install Rust with musl target
uses: actions-rs/toolchain@v1
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
3 changes: 1 addition & 2 deletions .github/workflows/truss-transfer-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:

## CLI direct install
- name: Install musl-tools
run: sudo apt-get update && sudo apt-get install -y musl-tools
run: sudo apt-get update && sudo apt-get install -y musl-tools libssl-dev libatomic-ops-dev

- name: Install Rust with musl target
uses: actions-rs/toolchain@v1
Expand All @@ -72,7 +72,6 @@ jobs:

- name: Build Statically Linked CLI Binary
run: |
apt-get update && apt-get install -y musl-tools musl-gcc
cargo build --release --target x86_64-unknown-linux-musl --features cli --bin truss_transfer_cli
chmod +x target/x86_64-unknown-linux-musl/release/truss_transfer_cli
./target/x86_64-unknown-linux-musl/release/truss_transfer_cli "./tmp_cli_no_fs_cache/test"
Expand Down
198 changes: 1 addition & 197 deletions truss-transfer/Cargo.lock

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

Loading
Loading