Skip to content

Commit

Permalink
linux-arm: build
Browse files Browse the repository at this point in the history
  • Loading branch information
ciiqr committed Oct 26, 2024
1 parent d32a80f commit 7f71667
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 12 deletions.
3 changes: 3 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ rustflags = [
"-L",
"-Wl,--copy-dt-needed-entries",
]

[target.aarch64-unknown-linux-musl]
linker = "aarch64-linux-gnu-gcc"
36 changes: 24 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
name: build
on:
push:
tags:
- v*
# TODO: debug
# tags:
# - v*
jobs:
build:
name: Build
strategy:
matrix:
build:
- target: x86_64-apple-darwin
os: macos-latest
- target: aarch64-apple-darwin
os: macos-latest
- target: x86_64-unknown-linux-musl
# TODO:
# - target: x86_64-apple-darwin
# os: macos-latest
# - target: aarch64-apple-darwin
# os: macos-latest
# - target: x86_64-unknown-linux-musl
# os: ubuntu-latest
- target: aarch64-unknown-linux-musl
os: ubuntu-latest
- target: x86_64-pc-windows-msvc
os: windows-latest
- target: aarch64-pc-windows-msvc
os: windows-latest
# TODO:
# - target: x86_64-pc-windows-msvc
# os: windows-latest
# - target: aarch64-pc-windows-msvc
# os: windows-latest
runs-on: ${{ matrix.build.os }}
steps:
- uses: actions/checkout@v4
Expand All @@ -27,6 +32,9 @@ jobs:
- name: Setup musl
run: sudo apt-get install -y musl-tools
if: endsWith(matrix.build.target, '-musl')
- name: Setup aarch64 linux
run: sudo apt-get install -y gcc-aarch64-linux-gnu
if: matrix.build.target == 'aarch64-unknown-linux-musl'
- name: Setup windows
run: |
# setup perl for bash shell https://github.com/sfackler/rust-openssl/issues/2149#issuecomment-2014064057
Expand All @@ -47,7 +55,11 @@ jobs:
--target "$TARGET" \
--message-format=json \
| jq -r '.message.rendered // .executable // empty'
)"
)" || {
declare exit_code="$?"
echo "$output"
exit "$exit_code"
}
{
echo 'ARTIFACT_PATHS<<EOF'
echo "$output"
Expand Down

0 comments on commit 7f71667

Please sign in to comment.