Skip to content

Commit

Permalink
Add aarch64-unknown-linux-musl target to CI and releases (#126)
Browse files Browse the repository at this point in the history
* Also use upgraded XCode to 13.2
  • Loading branch information
boxdot authored Jan 28, 2022
1 parent 7651676 commit aad2f44
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 2 deletions.
33 changes: 31 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,40 @@ jobs:
command: build
args: --target aarch64-unknown-linux-gnu

build-aarch64-unknown-linux-musl:
name: build (aarch64-unknown-linux-musl)
runs-on: ubuntu-latest
container:
image: rust:alpine
volumes:
- /usr/local/cargo/registry
env:
# For some reason `-crt-static` is not working for clang without lld
RUSTFLAGS: "-C link-arg=-fuse-ld=lld -C target-feature=-crt-static"
steps:
- name: Install dependencies
run: apk add --no-cache musl-dev lld protoc
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: ${{ env.FETCH_DEPTH }}
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
target: aarch64-unknown-linux-musl
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --target x86_64-unknown-linux-musl

build-test-x86_64-apple-darwin:
name: build and test (x86_64-apple-darwin)
runs-on: macos-latest
env:
SELECT_XCODE: /Applications/Xcode_12.2.app
SELECT_XCODE: /Applications/Xcode_13.2.app
steps:
- name: Select XCode version
run: sudo xcode-select -s "${SELECT_XCODE}"
Expand All @@ -156,7 +185,7 @@ jobs:
name: build (aarch64-apple-darwin)
runs-on: macos-latest
env:
SELECT_XCODE: /Applications/Xcode_12.2.app
SELECT_XCODE: /Applications/Xcode_13.2.app
steps:
- name: Select XCode version
run: sudo xcode-select -s "${SELECT_XCODE}"
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,38 @@ jobs:
name: dist-aarch64-unknown-linux-gnu
path: dist

dist-aarch64-unknown-linux-musl:
name: dist (aarch64-unknown-linux-musl)
runs-on: ubuntu-20.04
container:
image: rust:alpine
volumes:
- /usr/local/cargo/registry
env:
# For some reason `-crt-static` is not working for clang without lld
GURK_TARGET: aarch64-unknown-linux-musl
RUSTFLAGS: "-C link-arg=-fuse-ld=lld -C target-feature=-crt-static"
steps:
- name: Install dependencies
run: apk add --no-cache musl-dev clang lld protoc
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: ${{ env.FETCH_DEPTH }}
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
target: aarch64-unknown-linux-musl
- name: Dist
run: cargo xtask dist
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: dist-aarch64-unknown-linux-musl
path: dist

dist-x86_64-apple-darwin:
name: dist (x86_64-apple-darwin)
runs-on: macos-latest
Expand Down Expand Up @@ -180,6 +212,7 @@ jobs:
- dist-x86_64-unknown-linux-gnu
- dist-x86_64-unknown-linux-musl
- dist-aarch64-unknown-linux-gnu
- dist-aarch64-unknown-linux-musl
- dist-x86_64-apple-darwin
- dist-aarch64-apple-darwin
steps:
Expand Down Expand Up @@ -207,6 +240,10 @@ jobs:
with:
name: dist-aarch64-unknown-linux-gnu
path: dist
- uses: actions/download-artifact@v2
with:
name: dist-aarch64-unknown-linux-musl
path: dist

- run: ls -al
working-directory: dist
Expand Down

0 comments on commit aad2f44

Please sign in to comment.