-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Port ci from travis to github actions (#352)
* Setup github actions with a reusable workflow * Change doc tests referring to packed_simd_2 * Skip examples * Fix target features for avx512 rotate tests * Manually list target and rustflags combinations * Disable position independent code on i586 and i686 to make verify tests pass * Add timeout to job * Reuse action for docs and benchmarks * actions-rs is unmaintained, switch to dtolnay/rust-toolchain * Remove ci jobs for mips since it lacks nightly support Co-authored-by: Jubilee <46493976+workingjubilee@users.noreply.github.com> * Leave trailing newlines on .yml Co-authored-by: Jubilee <46493976+workingjubilee@users.noreply.github.com>
- Loading branch information
1 parent
d28356b
commit ffce298
Showing
8 changed files
with
362 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: benchmarks | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
x86_64-unknown-linux-gnu: | ||
uses: ./.github/workflows/run-ci-script.yml | ||
with: | ||
target: x86_64-unknown-linux-gnu | ||
setup_script: ci/setup_benchmarks.sh | ||
script: ci/benchmark.sh | ||
norun: 1 | ||
verify: 1 | ||
# FIXME: figure out how to add downloaded ispc to PATH | ||
# features: ispc | ||
x86_64-apple-darwin: | ||
uses: ./.github/workflows/run-ci-script.yml | ||
with: | ||
target: x86_64-apple-darwin | ||
runner: macos-latest | ||
setup_script: ci/setup_benchmarks.sh | ||
script: ci/benchmark.sh | ||
norun: 1 | ||
verify: 1 | ||
# FIXME: figure out how to add downloaded ispc to PATH | ||
# features: ispc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,218 @@ | ||
name: ci | ||
|
||
# trigger for all PRs and changes to master | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
rustfmt: | ||
uses: ./.github/workflows/run-ci-script.yml | ||
with: | ||
script: ci/all.sh check_fmt || true | ||
x86_64-unknown-linux-android: | ||
uses: ./.github/workflows/run-ci-script.yml | ||
strategy: | ||
fail-fast: true | ||
with: | ||
target: x86_64-linux-android | ||
arm-linux-androideabi: | ||
uses: ./.github/workflows/run-ci-script.yml | ||
strategy: | ||
fail-fast: true | ||
with: | ||
target: arm-linux-androideabi | ||
aarch64-unknown-linux-android-NEON: | ||
uses: ./.github/workflows/run-ci-script.yml | ||
strategy: | ||
fail-fast: true | ||
with: | ||
target: aarch64-linux-android | ||
rustflags: -Ctarget-feature=+neon | ||
thumbv7neon-linux-androideabi: | ||
uses: ./.github/workflows/run-ci-script.yml | ||
strategy: | ||
fail-fast: false | ||
with: | ||
target: thumbv7neon-linux-androideabi | ||
i586-unknown-linux-gnu: | ||
uses: ./.github/workflows/run-ci-script.yml | ||
strategy: | ||
fail-fast: false | ||
with: | ||
target: i586-unknown-linux-gnu | ||
rustflags: -Crelocation-model=static | ||
i586-unknown-linux-gnu-SSE: | ||
uses: ./.github/workflows/run-ci-script.yml | ||
strategy: | ||
fail-fast: false | ||
with: | ||
target: i586-unknown-linux-gnu | ||
rustflags: -Crelocation-model=static -Ctarget-feature=+sse | ||
i586-unknown-linux-gnu-SSE2: | ||
uses: ./.github/workflows/run-ci-script.yml | ||
strategy: | ||
fail-fast: false | ||
with: | ||
target: i586-unknown-linux-gnu | ||
rustflags: -Crelocation-model=static -Ctarget-feature=+sse2 | ||
i686-unknown-linux-gnu: | ||
uses: ./.github/workflows/run-ci-script.yml | ||
strategy: | ||
fail-fast: false | ||
with: | ||
target: i686-unknown-linux-gnu | ||
rustflags: -Crelocation-model=static | ||
i686-unknown-linux-gnu-SSE4_2: | ||
uses: ./.github/workflows/run-ci-script.yml | ||
strategy: | ||
fail-fast: false | ||
with: | ||
target: i686-unknown-linux-gnu | ||
rustflags: -Crelocation-model=static -Ctarget-feature=+sse4.2 | ||
i686-unknown-linux-gnu-AVX2: | ||
uses: ./.github/workflows/run-ci-script.yml | ||
strategy: | ||
fail-fast: false | ||
with: | ||
target: i686-unknown-linux-gnu | ||
rustflags: -Crelocation-model=static -Ctarget-feature=+avx2 | ||
x86_64-unknown-linux-gnu: | ||
uses: ./.github/workflows/run-ci-script.yml | ||
strategy: | ||
fail-fast: true | ||
with: | ||
target: x86_64-unknown-linux-gnu | ||
x86_64-unknown-linux-gnu-SSE4_2: | ||
uses: ./.github/workflows/run-ci-script.yml | ||
strategy: | ||
fail-fast: true | ||
with: | ||
target: x86_64-unknown-linux-gnu | ||
rustflags: -Ctarget-feature=+sse4.2 | ||
x86_64-unknown-linux-gnu-AVX2: | ||
uses: ./.github/workflows/run-ci-script.yml | ||
strategy: | ||
fail-fast: true | ||
with: | ||
target: x86_64-unknown-linux-gnu | ||
rustflags: -Ctarget-feature=+avx2 | ||
arm-unknown-linux-gnueabihf: | ||
uses: ./.github/workflows/run-ci-script.yml | ||
strategy: | ||
fail-fast: true | ||
with: | ||
target: arm-unknown-linux-gnueabihf | ||
armv7-unknown-linux-gnueabihf: | ||
uses: ./.github/workflows/run-ci-script.yml | ||
strategy: | ||
fail-fast: true | ||
with: | ||
target: armv7-unknown-linux-gnueabihf | ||
armv7-unknown-linux-gnueabihf-NEON: | ||
uses: ./.github/workflows/run-ci-script.yml | ||
strategy: | ||
fail-fast: true | ||
with: | ||
target: armv7-unknown-linux-gnueabihf | ||
rustflags: -Ctarget-feature=+neon | ||
thumbv7neon-unknown-linux-gnueabihf: | ||
uses: ./.github/workflows/run-ci-script.yml | ||
strategy: | ||
fail-fast: false | ||
with: | ||
target: thumbv7neon-unknown-linux-gnueabihf | ||
aarch64-unknown-linux-gnu-NEON: | ||
uses: ./.github/workflows/run-ci-script.yml | ||
strategy: | ||
fail-fast: true | ||
with: | ||
target: aarch64-unknown-linux-gnu | ||
rustflags: -Ctarget-feature=+neon | ||
powerpc-unknown-linux-gnu: | ||
uses: ./.github/workflows/run-ci-script.yml | ||
strategy: | ||
fail-fast: false | ||
with: | ||
target: powerpc-unknown-linux-gnu | ||
powerpc64-unknown-linux-gnu: | ||
uses: ./.github/workflows/run-ci-script.yml | ||
strategy: | ||
fail-fast: false | ||
with: | ||
target: powerpc64-unknown-linux-gnu | ||
powerpc64le-unknown-linux-gnu: | ||
uses: ./.github/workflows/run-ci-script.yml | ||
strategy: | ||
fail-fast: true | ||
with: | ||
target: powerpc64le-unknown-linux-gnu | ||
powerpc64le-unknown-linux-gnu-ALTIVEC: | ||
uses: ./.github/workflows/run-ci-script.yml | ||
strategy: | ||
fail-fast: true | ||
with: | ||
target: powerpc64le-unknown-linux-gnu | ||
rustflags: -Ctarget-feature=+altivec | ||
powerpc64le-unknown-linux-gnu-VSX: | ||
uses: ./.github/workflows/run-ci-script.yml | ||
strategy: | ||
fail-fast: true | ||
with: | ||
target: powerpc64le-unknown-linux-gnu | ||
rustflags: -Ctarget-feature=+vsx | ||
s390x-unknown-linux-gnu: | ||
uses: ./.github/workflows/run-ci-script.yml | ||
strategy: | ||
fail-fast: false | ||
with: | ||
target: s390x-unknown-linux-gnu | ||
sparc64-unknown-linux-gnu: | ||
uses: ./.github/workflows/run-ci-script.yml | ||
strategy: | ||
fail-fast: false | ||
with: | ||
target: sparc64-unknown-linux-gnu | ||
wasm32-unknown-unknown: | ||
uses: ./.github/workflows/run-ci-script.yml | ||
strategy: | ||
fail-fast: false | ||
with: | ||
target: wasm32-unknown-unknown | ||
x86_64-apple-darwin-SSE4_2: | ||
uses: ./.github/workflows/run-ci-script.yml | ||
strategy: | ||
fail-fast: true | ||
with: | ||
runner: macos-latest | ||
script: ci/run.sh | ||
target: x86_64-apple-darwin | ||
rustflags: -Ctarget-feature=+sse4.2 | ||
x86_64-apple-darwin-AVX: | ||
uses: ./.github/workflows/run-ci-script.yml | ||
strategy: | ||
fail-fast: true | ||
with: | ||
runner: macos-latest | ||
script: ci/run.sh | ||
target: x86_64-apple-darwin | ||
rustflags: -Ctarget-feature=+avx | ||
x86_64-apple-ios: | ||
uses: ./.github/workflows/run-ci-script.yml | ||
strategy: | ||
fail-fast: true | ||
with: | ||
runner: macos-latest | ||
script: ci/run.sh | ||
target: x86_64-apple-ios | ||
aarch-apple-ios: | ||
uses: ./.github/workflows/run-ci-script.yml | ||
strategy: | ||
fail-fast: true | ||
with: | ||
runner: macos-latest | ||
script: ci/run.sh | ||
target: aarch-apple-ios | ||
rustflags: -Ctarget-feature=+neon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
docs: | ||
uses: ./.github/workflows/run-ci-script.yml | ||
with: | ||
setup_script: cargo install mdbook | ||
script: ci/dox.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
name: run-ci-script | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
runner: | ||
required: false | ||
type: string | ||
default: ubuntu-latest | ||
target: | ||
required: false | ||
type: string | ||
default: '' | ||
rustflags: | ||
required: false | ||
type: string | ||
default: '' | ||
script: | ||
required: false | ||
type: string | ||
default: ci/run-docker.sh | ||
setup_script: | ||
required: false | ||
type: string | ||
norun: | ||
required: false | ||
type: string | ||
default: '' | ||
verify: | ||
required: false | ||
type: string | ||
default: '' | ||
features: | ||
required: false | ||
type: string | ||
default: '' | ||
|
||
jobs: | ||
run-ci-script: | ||
runs-on: ${{ inputs.runner }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Init Rustup Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.rustup/toolchains | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/rust-toolchain') }} | ||
- name: Install Toolchain | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
# FIXME: change to nightly once https://github.com/rust-lang/packed_simd/pull/350 is merged | ||
# needs to be kept in sync with the toolchain files | ||
toolchain: nightly-2023-06-14 | ||
targets: ${{ inputs.target }} | ||
components: rustfmt | ||
- name: Generate Lockfile | ||
run: cargo generate-lockfile | ||
- name: Init Cargo Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/ | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
- name: Setup | ||
if: ${{ inputs.setup_script != '' }} | ||
run: ${{ inputs.setup_script }} | ||
env: | ||
TARGET: ${{ inputs.target }} | ||
RUSTFLAGS: ${{ inputs.rustflags }} | ||
NORUN: ${{ inputs.norun }} | ||
VERIFY: ${{ inputs.verify }} | ||
FEATURES: ${{ inputs.features }} | ||
- name: Run CI Script | ||
timeout-minutes: 15 | ||
run: ${{ inputs.script }} | ||
env: | ||
TARGET: ${{ inputs.target }} | ||
RUSTFLAGS: ${{ inputs.rustflags }} | ||
NORUN: ${{ inputs.norun }} | ||
VERIFY: ${{ inputs.verify }} | ||
FEATURES: ${{ inputs.features }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
nightly | ||
nightly-2023-06-14 |
Oops, something went wrong.