ci: Run tests in CI
* ci: Run tests in CI Thanks to contributors test coverage is becoming a thing, thus it makes sense to run tests in CI workflows. Additionally, switch back to `cargo build` instead of `cargo check`, as the tests need compilation anyway. * ci: Enable build for `macos-aarch64` * fix: Streamline build target names * fix: Set toolchain target correctly * ci: Switch to `rustup` over 3rd party action
This commit is contained in:
committed by
GitHub
parent
beae6c3bec
commit
0f1a9ab579
25
.github/workflows/cd.yml
vendored
25
.github/workflows/cd.yml
vendored
@@ -15,7 +15,6 @@ jobs:
|
||||
container: ${{ matrix.container }}
|
||||
strategy:
|
||||
matrix:
|
||||
build_target: [linux-x86_64, linux-arm64, linux-armhf, macos-x86_64, windows-x86_64]
|
||||
include:
|
||||
- build_target: linux-x86_64
|
||||
os: ubuntu-latest
|
||||
@@ -43,16 +42,28 @@ jobs:
|
||||
os: macos-latest
|
||||
target: x86_64-apple-darwin
|
||||
features: '--no-default-features --features rodio_backend,pancurses_backend'
|
||||
- build_target: macos-aarch64
|
||||
os: macos-14
|
||||
target: aarch64-apple-darwin
|
||||
artifact_suffix: macos-aarch64
|
||||
features: '--no-default-features --features rodio_backend,cursive/pancurses-backend'
|
||||
- build_target: windows-x86_64
|
||||
os: windows-latest
|
||||
target: x86_64-pc-windows-msvc
|
||||
features: '--no-default-features --features rodio_backend,pancurses_backend,share_clipboard,notify'
|
||||
steps:
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
target: ${{ matrix.target }}
|
||||
toolchain: stable
|
||||
- uses: actions/checkout@v4
|
||||
name: Checkout src
|
||||
- name: Install rustup
|
||||
if: runner.os != 'Windows'
|
||||
shell: bash
|
||||
run: |
|
||||
if ! command -v rustup &>/dev/null; then
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH
|
||||
fi
|
||||
- name: Add cross-compilation target
|
||||
run: rustup target add ${{ matrix.target }}
|
||||
- name: Install macOS dependencies
|
||||
if: matrix.os == 'macos-latest'
|
||||
run: brew install portaudio pkg-config
|
||||
@@ -67,8 +78,6 @@ jobs:
|
||||
run: |
|
||||
apt update
|
||||
apt install -y ${{ matrix.dependencies }}
|
||||
- uses: actions/checkout@v4
|
||||
name: Checkout src
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
|
||||
Reference in New Issue
Block a user