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

build: support aarch64 #264

Merged
merged 6 commits into from
Jul 5, 2023
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
40 changes: 39 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,20 @@ on:
- "!docs/**"
- "!.github/**"
- ".github/workflows/ci.yml"
workflow_dispatch:
inputs:
lint:
description: Run lint job
type: boolean
default: true
test:
description: Run test job
type: boolean
default: true
build:
description: Run build job
type: boolean
default: false

concurrency:
group: ${{ github.ref }}
Expand All @@ -29,6 +43,7 @@ jobs:
lint:
name: lint
runs-on: ubuntu-latest
if: github.event_name != 'workflow_dispatch' || (github.event_name == 'workflow_dispatch' && inputs.lint)
steps:
- uses: actions/checkout@v3

Expand All @@ -55,6 +70,7 @@ jobs:
test:
name: Test Suite
runs-on: ${{ matrix.target.runner }}
if: github.event_name != 'workflow_dispatch' || (github.event_name == 'workflow_dispatch' && inputs.test)
needs: lint
strategy:
matrix:
Expand Down Expand Up @@ -90,15 +106,22 @@ jobs:
name: build
needs: test
runs-on: ${{ matrix.target.runner }}
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
if: (github.event_name == 'workflow_dispatch' && inputs.build) || (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'))
strategy:
matrix:
target:
# each musl target also needs to use vendored openssl-sys in Cargo.toml for the build to work
- triple: x86_64-pc-windows-msvc
filename: rotz.exe
runner: windows-latest
compile: native

# Waiting for https://github.com/briansmith/ring/issues/1614 to be released
# # - triple: aarch64-pc-windows-msvc
# # filename: rotz.exe
# # runner: windows-latest
# # compile: native

- triple: i686-pc-windows-msvc
filename: rotz.exe
runner: windows-latest
Expand All @@ -109,6 +132,11 @@ jobs:
runner: ubuntu-latest
compile: cross

- triple: aarch64-unknown-linux-gnu
filename: rotz
runner: ubuntu-latest
compile: cross

- triple: i686-unknown-linux-gnu
filename: rotz
runner: ubuntu-latest
Expand All @@ -119,6 +147,11 @@ jobs:
runner: ubuntu-latest
compile: cross

- triple: aarch64-unknown-linux-musl
filename: rotz
runner: ubuntu-latest
compile: cross

- triple: i686-unknown-linux-musl
filename: rotz
runner: ubuntu-latest
Expand All @@ -129,6 +162,11 @@ jobs:
runner: macos-latest
compile: native

- triple: aarch64-apple-darwin
filename: rotz
runner: macos-latest
compile: native

steps:
- uses: actions/checkout@v3

Expand Down
6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ openssl-sys = { version = "0.9.90", features = ["vendored"] }
[target.i686-unknown-linux-musl.dependencies]
openssl-sys = { version = "0.9.90", features = ["vendored"] }

[target.aarch64-unknown-linux-musl.dependencies]
openssl-sys = { version = "0.9.90", features = ["vendored"] }

[dev-dependencies]
fake = { version = "2.6.1", features = ["derive"] }
rand = "0.8.5"
Expand All @@ -85,3 +88,6 @@ pre-build = []

[package.metadata.cross.target.i686-unknown-linux-musl]
pre-build = []

[package.metadata.cross.target.aarch64-unknown-linux-musl]
pre-build = []