Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add aarch64-unknown-linux-musl target to CI and releases #126

Merged
merged 3 commits into from
Jan 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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