mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-24 14:28:42 +00:00
Migrate CI and builds to Just, add "full" builds (#660)
This commit is contained in:
parent
305bf8123d
commit
aea9df602c
30 changed files with 717 additions and 463 deletions
119
.github/workflows/ci.yml
vendored
Normal file
119
.github/workflows/ci.yml
vendored
Normal file
|
@ -0,0 +1,119 @@
|
|||
name: CI
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
CARGO_UNSTABLE_SPARSE_REGISTRY: "true"
|
||||
|
||||
jobs:
|
||||
test:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- target: x86_64-apple-darwin
|
||||
os: macos-latest
|
||||
- target: x86_64-unknown-linux-gnu
|
||||
os: ubuntu-latest
|
||||
- target: x86_64-unknown-linux-musl
|
||||
os: ubuntu-latest
|
||||
- target: x86_64-pc-windows-msvc
|
||||
os: windows-latest
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
CARGO_BUILD_TARGET: ${{ matrix.target }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: ./.github/actions/just-setup
|
||||
with:
|
||||
cache-suffix: ${{ env.CARGO_BUILD_TARGET }}
|
||||
|
||||
- run: just toolchain
|
||||
- run: just ci-install-deps
|
||||
- run: just test
|
||||
|
||||
linux-cross-check:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
target:
|
||||
- armv7-unknown-linux-musleabihf
|
||||
- armv7-unknown-linux-gnueabihf
|
||||
- aarch64-unknown-linux-musl
|
||||
- aarch64-unknown-linux-gnu
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CARGO_BUILD_TARGET: ${{ matrix.target }}
|
||||
JUST_USE_CROSS: true
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: ./.github/actions/just-setup
|
||||
with:
|
||||
tools: cross
|
||||
cache-suffix: ${{ env.CARGO_BUILD_TARGET }}
|
||||
|
||||
- run: just toolchain
|
||||
- run: just ci-install-deps
|
||||
- run: just check
|
||||
|
||||
apple-m1-check:
|
||||
runs-on: macos-latest
|
||||
env:
|
||||
CARGO_BUILD_TARGET: aarch64-apple-darwin
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: ./.github/actions/just-setup
|
||||
with:
|
||||
cache-suffix: ${{ env.CARGO_BUILD_TARGET }}
|
||||
|
||||
- run: just toolchain
|
||||
- run: just check
|
||||
|
||||
lint:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: ./.github/actions/just-setup
|
||||
|
||||
- run: just toolchain rustfmt,clippy
|
||||
- run: just ci-install-deps
|
||||
- run: just lint
|
||||
|
||||
# Dummy job to have a stable name for the "all tests pass" requirement
|
||||
tests-pass:
|
||||
name: Tests pass
|
||||
needs:
|
||||
- test
|
||||
- linux-cross-check
|
||||
- apple-m1-check
|
||||
- lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo "Tests pass"
|
||||
|
||||
# if everything succeeds and PR is ready for review, test the release/package process
|
||||
release-builds:
|
||||
if: (github.event_name == 'pull_request' && github.event.pull_request.draft == false) || github.event_name == 'workflow_dispatch'
|
||||
needs:
|
||||
- tests-pass
|
||||
uses: ./.github/workflows/release-build.yml
|
Loading…
Add table
Add a link
Reference in a new issue