Skip to content

Commit

Permalink
wip: Add cross-build job to GitHub workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Orris committed Mar 7, 2024
1 parent 4a198c2 commit 3577f2e
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/publish-dev-ci-base-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
push:
branches:
- disabled-as-this-branch-does-not-exist
- 779-build-arm-binaries-and-containers-for-linux-and-macos
# - 779-build-arm-binaries-and-containers-for-linux-and-macos
# - 1639-upgrade-to-polkadot-release-v100
env:
BIN_DIR: target/release
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/verify-pr-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,49 @@ jobs:
steps:
- run: echo "Just a dummy matrix to satisfy GitHub required checks that were skipped"

cross-build:
# needs: changes
# if: needs.changes.outputs.rust == 'true'
name: ${{ matrix.platform.os_name }} with rust ${{ matrix.toolchain }}
runs-on: ${{ matrix.platform.os }}
strategy:
fail-fast: false
matrix:
platform:
- os_name: Linux-aarch64
os: ubuntu-22.04
target: aarch64-unknown-linux-musl
binary: frequency
- os_name: Linux-x86_64
os: ubuntu-22.04
target: x86_64-unknown-linux-gnu
binary: frequency
- os_name: macOS-x86_64
os: macOS-latest
target: x86_64-apple-darwin
binary: frequency
- os_name: macOS-aarch64
os: macOS-latest
target: aarch64-apple-darwin
binary: frequency
toolchain:
- stable
steps:
- run: echo "Cross Build ${{ matrix.platform.os_name }} with rust ${{ matrix.toolchain }}"
- uses: actions/checkout@v4
- name: Build Binary
uses: houseabsolute/actions-rust-cross@v0
with:
command: "build"
target: ${{ matrix.platform.target }}
toolchain: ${{ matrix.toolchain }}
args: "--release --features frequency-no-relay"
strip: true
# - name: Rename Binary (linux and macos)
# run: mv target/${{ matrix.platform.target }}/release/frequency ${{ matrix.platform.binary }}
# if: matrix.platform.os_name


build-binaries:
needs: changes
if: needs.changes.outputs.build-binary == 'true'
Expand Down
2 changes: 2 additions & 0 deletions pallets/capacity/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
missing_docs
)]

// REMOVE: need to touch rs file for testing

use frame_support::{
ensure,
traits::{
Expand Down

0 comments on commit 3577f2e

Please sign in to comment.