Skip to content

Commit

Permalink
ci: fix arm build
Browse files Browse the repository at this point in the history
Signed-off-by: Yaroslav Bolyukin <[email protected]>
  • Loading branch information
CertainLach committed Jul 4, 2021
1 parent ec3780b commit 070336f
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,36 +126,40 @@ jobs:
with:
platform: x86

- name: Musl gcc
if: ${{ endsWith(matrix.target, '-musl') }}
run: sudo apt install musl musl-tools

- name: ARM cross compiler
if: ${{ matrix.target == 'aarch64-unknown-linux-gnu' }}
if: ${{ startsWith(matrix.target, 'aarch64-unknown-linux-') }}
uses: actions-rs/cargo@v1
with:
command: install
args: cross

- name: ARM gcc
if: ${{ matrix.target == 'aarch64-unknown-linux-gnu' }}
if: ${{ startsWith(matrix.target, 'aarch64-unknown-linux-') }}
run: sudo apt install gcc-aarch64-linux-gnu

- name: Run ARM build
if: ${{ matrix.target == 'aarch64-unknown-linux-gnu' }}
if: ${{ startsWith(matrix.target, 'aarch64-unknown-linux-') }}
shell: bash
run: cross build --bin=jrsonnet --release --target ${{ matrix.target }}

- name: Run ARM strip
if: ${{ matrix.target == 'aarch64-unknown-linux-gnu' }}
if: ${{ startsWith(matrix.target, 'aarch64-unknown-linux-') }}
shell: bash
run: aarch64-linux-gnu-strip target/${{ matrix.target }}/release/${{ matrix.bin }}

- name: Run build
if: ${{ matrix.target != 'aarch64-unknown-linux-gnu' }}
if: ${{ !startsWith(matrix.target, 'aarch64-unknown-linux-') }}
uses: actions-rs/cargo@v1
with:
command: build
args: --bin=jrsonnet --release --target ${{ matrix.target }}

- name: Run strip
if: ${{ matrix.target != 'aarch64-unknown-linux-gnu' }}
if: ${{ !startsWith(matrix.target, 'aarch64-unknown-linux-') }}
shell: bash
run: strip target/${{ matrix.target }}/release/${{ matrix.bin }}

Expand Down

0 comments on commit 070336f

Please sign in to comment.