mirror of
https://github.com/babichjacob/ac-qu-ai-nt.git
synced 2025-10-02 04:47:53 -04:00
Compare commits
19 Commits
e4e2efafb9
...
4c04f21dcb
Author | SHA1 | Date | |
---|---|---|---|
![]() |
4c04f21dcb | ||
![]() |
c0ec64f06c | ||
![]() |
70e20e2e04 | ||
![]() |
12107daf6b | ||
![]() |
839f219469 | ||
![]() |
56ad1de3d4 | ||
![]() |
30dee5efa7 | ||
![]() |
52297c7b43 | ||
![]() |
b1520ae76b | ||
![]() |
ac42b4861c | ||
![]() |
499562853c | ||
![]() |
d6922c30c5 | ||
![]() |
b5935b8ab5 | ||
![]() |
5e0a2326ca | ||
![]() |
1493425540 | ||
![]() |
576a8e99c0 | ||
![]() |
01ce1e85a8 | ||
![]() |
cd788e1ab8 | ||
![]() |
65487b2378 |
150
.github/workflows/check-and-build-and-test.yml
vendored
150
.github/workflows/check-and-build-and-test.yml
vendored
@@ -3,6 +3,14 @@ name: Check, build, and test
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: ["main"]
|
branches: ["main"]
|
||||||
|
# This workflow is definitely expensive for GitHub,
|
||||||
|
# so let's not let files that won't affect the project's ability to build and test trigger it
|
||||||
|
paths-ignore:
|
||||||
|
- ".github/**"
|
||||||
|
- "**/.gitignore"
|
||||||
|
- "**/CHANGELOG.md"
|
||||||
|
- "**/README.md"
|
||||||
|
- "**/LICENSE-*"
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: ["main"]
|
branches: ["main"]
|
||||||
|
|
||||||
@@ -10,35 +18,143 @@ env:
|
|||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-build-and-test:
|
formatting:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 15
|
timeout-minutes: 2
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
- name: Install stable Rust toolchain
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
|
||||||
|
- name: Formatting
|
||||||
|
run: cargo fmt --check --verbose
|
||||||
|
|
||||||
|
check-and-build:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
supporteds:
|
||||||
|
- runner: macos-latest
|
||||||
|
target: aarch64-apple-darwin
|
||||||
|
|
||||||
|
- runner: macos-latest
|
||||||
|
target: x86_64-apple-darwin
|
||||||
|
|
||||||
|
- install_prerequisite: sudo apt-get update && sudo apt-get install gcc-aarch64-linux-gnu
|
||||||
|
runner: ubuntu-latest
|
||||||
|
target: aarch64-unknown-linux-gnu
|
||||||
|
|
||||||
|
- install_prerequisite: sudo apt-get update && sudo apt-get install gcc-aarch64-linux-gnu
|
||||||
|
runner: ubuntu-latest
|
||||||
|
target: aarch64-unknown-linux-musl
|
||||||
|
|
||||||
|
- runner: ubuntu-latest
|
||||||
|
target: x86_64-unknown-linux-gnu
|
||||||
|
|
||||||
|
- runner: ubuntu-latest
|
||||||
|
target: x86_64-unknown-linux-musl
|
||||||
|
|
||||||
|
# I would like to support this but I don't know how to install the dependencies to be able to
|
||||||
|
# - runner: windows-latest
|
||||||
|
# target: aarch64-pc-windows-gnullvm
|
||||||
|
|
||||||
|
- runner: windows-latest
|
||||||
|
target: aarch64-pc-windows-msvc
|
||||||
|
|
||||||
|
- runner: windows-latest
|
||||||
|
target: x86_64-pc-windows-gnu
|
||||||
|
|
||||||
|
- runner: windows-latest
|
||||||
|
target: x86_64-pc-windows-msvc
|
||||||
|
name: Check and build ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }})
|
||||||
|
runs-on: ${{ matrix.supporteds.runner }}
|
||||||
|
timeout-minutes: 5
|
||||||
|
env:
|
||||||
|
# https://github.com/rust-lang/stacker/issues/80#issuecomment-1547991131
|
||||||
|
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
|
||||||
|
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER: aarch64-linux-gnu-gcc # TODO: shouldn't this be something to do with musl, not gcc?
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install prerequisite build chain
|
||||||
|
if: matrix.supporteds.install_prerequisite
|
||||||
|
run: ${{ matrix.supporteds.install_prerequisite }}
|
||||||
|
|
||||||
|
- name: Install stable Rust toolchain
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
with:
|
||||||
|
targets: ${{ matrix.supporteds.target }}
|
||||||
|
|
||||||
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
|
- name: Check
|
||||||
|
run: cargo check --verbose --target ${{ matrix.supporteds.target }}
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: cargo build --verbose --target ${{ matrix.supporteds.target }}
|
||||||
|
|
||||||
|
test:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
supporteds:
|
||||||
|
- runner: macos-latest
|
||||||
|
target: aarch64-apple-darwin
|
||||||
|
|
||||||
|
- runner: macos-latest
|
||||||
|
target: x86_64-apple-darwin
|
||||||
|
|
||||||
|
# Not able to be tested in GitHub Actions (without emulation, at least)
|
||||||
|
# - runner: ubuntu-latest
|
||||||
|
# target: aarch64-unknown-linux-gnu
|
||||||
|
|
||||||
|
# Not able to be tested in GitHub Actions (without emulation, at least)
|
||||||
|
# - runner: ubuntu-latest
|
||||||
|
# target: aarch64-unknown-linux-musl
|
||||||
|
|
||||||
|
- runner: ubuntu-latest
|
||||||
|
target: x86_64-unknown-linux-gnu
|
||||||
|
|
||||||
|
- runner: ubuntu-latest
|
||||||
|
target: x86_64-unknown-linux-musl
|
||||||
|
|
||||||
|
# Not able to be tested in GitHub Actions (without emulation, at least)
|
||||||
|
# - runner: windows-latest
|
||||||
|
# target: aarch64-pc-windows-gnullvm
|
||||||
|
|
||||||
|
# Not able to be tested in GitHub Actions (without emulation, at least)
|
||||||
|
# - runner: windows-latest
|
||||||
|
# target: aarch64-pc-windows-msvc
|
||||||
|
|
||||||
|
- runner: windows-latest
|
||||||
|
target: x86_64-pc-windows-gnu
|
||||||
|
|
||||||
|
- runner: windows-latest
|
||||||
|
target: x86_64-pc-windows-msvc
|
||||||
|
name: Test ${{ matrix.supporteds.target }} (on ${{ matrix.supporteds.runner }})
|
||||||
|
runs-on: ${{ matrix.supporteds.runner }}
|
||||||
|
timeout-minutes: 5
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install stable Rust toolchain
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
with:
|
||||||
|
targets: ${{ matrix.supporteds.target }}
|
||||||
|
|
||||||
- name: Install Nextest
|
- name: Install Nextest
|
||||||
uses: taiki-e/install-action@cargo-nextest
|
uses: taiki-e/install-action@cargo-nextest
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
- name: Check
|
|
||||||
run: cargo check --verbose
|
|
||||||
|
|
||||||
- name: Formatting
|
|
||||||
run: cargo fmt --check --verbose
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: cargo build --verbose
|
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: cargo nextest run
|
run: cargo nextest run --target ${{ matrix.supporteds.target }}
|
||||||
|
|
||||||
minimal-dependencies-check-build-and-test:
|
minimal-dependencies-check-build-and-test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 15
|
timeout-minutes: 5
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -52,11 +168,11 @@ jobs:
|
|||||||
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
- name: Check (direct minimal dependencies)
|
- name: Check (minimal direct dependencies)
|
||||||
run: cargo minimal-versions check --direct --workspace
|
run: cargo minimal-versions check --direct --workspace
|
||||||
|
|
||||||
- name: Build (direct minimal dependencies)
|
- name: Build (minimal direct dependencies)
|
||||||
run: cargo minimal-versions build --direct --workspace
|
run: cargo minimal-versions build --direct --workspace
|
||||||
|
|
||||||
- name: Test (direct minimal dependencies)
|
- name: Test (minimal direct dependencies)
|
||||||
run: cargo minimal-versions test --direct --workspace
|
run: cargo minimal-versions test --direct --workspace
|
||||||
|
Reference in New Issue
Block a user