Skip to content

Commit

Permalink
Merge pull request #264 from kecrily/build/aarch64
Browse files Browse the repository at this point in the history
build: support aarch64
  • Loading branch information
volllly authored Jul 5, 2023
2 parents 5637fef + f5e2903 commit 31523b1
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
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 = []

0 comments on commit 31523b1

Please sign in to comment.