Skip to content

Commit

Permalink
ci(arm): Adds support for cross compilation and publishes Relay ARM d…
Browse files Browse the repository at this point in the history
…ocker images (#3272)

Updates the build/ci to support building multi arch docker images.

- Removes the now-unused docker images and build scripts, they are no
longer used and we don't want to maintain them, they will eventually
break.
- Uses `regctl` to transfer multi arch images directly between
registries
- Fixes `relay-debug.zip` and `relay.src.zip` inconsistency


Future improvements:
- Add `aarch64-apple-darwin` to the matrix build
- Release aarch64 binaries on release builds
- Sign images (?)
  • Loading branch information
Dav1dde authored Apr 29, 2024
1 parent c6a4c69 commit 8c75086
Show file tree
Hide file tree
Showing 13 changed files with 214 additions and 351 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@

!docker-entrypoint.sh
!Makefile

# CI files necessary for building the docker file
!linux/
14 changes: 7 additions & 7 deletions .github/workflows/build_binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,25 @@ jobs:
with:
submodules: recursive

- name: Build in Docker
- name: Install Rust Toolchain
run: rustup toolchain install stable --profile minimal --no-self-update

- name: Build binary
run: |
# Get the latest stable rust toolchain version available
TOOLCHAIN=$(curl -s 'https://static.rust-lang.org/dist/channel-rust-stable.toml' | awk '/\[pkg.rust\]/ {getline;print;}' | sed -r 's/^version = "([0-9.]+) .*/\1/')
scripts/docker-build-linux.sh "$TOOLCHAIN"
make build-linux-release
env:
BUILD_ARCH: x86_64
RELAY_FEATURES:

- name: Bundle Debug File
run: |
cd target/x86_64-unknown-linux-gnu/release/
cd target/release/
zip relay-Linux-x86_64-debug.zip relay.debug
mv relay relay-Linux-x86_64
- uses: actions/upload-artifact@v3
with:
name: ${{ github.sha }}
path: target/x86_64-unknown-linux-gnu/release/relay-Linux-x86_64*
path: target/release/relay-Linux-x86_64*

macos:
name: macOS
Expand Down
Loading

0 comments on commit 8c75086

Please sign in to comment.