mirror of
https://github.com/lune-org/lune.git
synced 2024-12-12 04:50:36 +00:00
Add build target matrix to CI, update some old workflow stuff
This commit is contained in:
parent
e2aef015fa
commit
6a28ae21d8
3 changed files with 64 additions and 17 deletions
66
.github/workflows/ci.yaml
vendored
66
.github/workflows/ci.yaml
vendored
|
@ -5,29 +5,75 @@ on:
|
|||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
name: CI
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
jobs:
|
||||
|
||||
fmt:
|
||||
name: Check formatting
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: rustfmt, clippy
|
||||
components: rustfmt
|
||||
|
||||
- name: Rustfmt
|
||||
- name: Check Formatting
|
||||
run: cargo fmt -- --check
|
||||
|
||||
- name: Build
|
||||
run: cargo build --locked
|
||||
ci:
|
||||
needs: ["fmt"]
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- name: Windows x86_64
|
||||
runner-os: windows-latest
|
||||
cargo-target: x86_64-pc-windows-msvc
|
||||
|
||||
- name: Clippy
|
||||
- name: Linux x86_64
|
||||
runner-os: ubuntu-latest
|
||||
cargo-target: x86_64-unknown-linux-gnu
|
||||
|
||||
- name: Linux aarch64
|
||||
runner-os: ubuntu-latest
|
||||
cargo-target: aarch64-unknown-linux-gnu
|
||||
|
||||
- name: macOS x86_64
|
||||
runner-os: macos-latest
|
||||
cargo-target: x86_64-apple-darwin
|
||||
|
||||
- name: macOS aarch64
|
||||
runner-os: macos-latest
|
||||
cargo-target: aarch64-apple-darwin
|
||||
|
||||
name: CI - ${{ matrix.name }}
|
||||
runs-on: ${{ matrix.runner-os }}
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: clippy
|
||||
targets: ${{ matrix.cargo-target }}
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cargo build \
|
||||
--locked --all-features \
|
||||
--target ${{ matrix.cargo-target }}
|
||||
|
||||
- name: Lint
|
||||
run: cargo clippy
|
||||
|
||||
- name: Test
|
||||
|
|
2
.github/workflows/publish.yaml
vendored
2
.github/workflows/publish.yaml
vendored
|
@ -12,7 +12,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
|
|
13
.github/workflows/release.yaml
vendored
13
.github/workflows/release.yaml
vendored
|
@ -6,6 +6,10 @@ on:
|
|||
permissions:
|
||||
contents: write
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
env:
|
||||
CARGO_TARGET_DIR: output
|
||||
|
||||
|
@ -17,7 +21,7 @@ jobs:
|
|||
version: ${{ steps.get_version.outputs.value }}
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Get version from manifest
|
||||
uses: SebRollen/toml-action@9062fbef52816d61278d24ce53c8070440e1e8dd
|
||||
|
@ -60,14 +64,14 @@ jobs:
|
|||
runs-on: ${{ matrix.runner-os }}
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
targets: ${{ matrix.cargo-target }}
|
||||
|
||||
- name: Install tooling (aarch64-unknown-linux-gnu)
|
||||
- name: Install build tooling (aarch64-unknown-linux-gnu)
|
||||
if: matrix.cargo-target == 'aarch64-unknown-linux-gnu'
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
|
@ -75,14 +79,12 @@ jobs:
|
|||
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
|
||||
|
||||
- name: Build binary
|
||||
shell: bash
|
||||
run: |
|
||||
cargo build \
|
||||
--locked --release --all-features \
|
||||
--target ${{ matrix.cargo-target }}
|
||||
|
||||
- name: Create binary archive
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p staging
|
||||
if [ "${{ matrix.runner-os }}" = "windows-latest" ]; then
|
||||
|
@ -113,7 +115,6 @@ jobs:
|
|||
path: ./binaries
|
||||
|
||||
- name: Discover binaries
|
||||
shell: bash
|
||||
run: |
|
||||
cd ./binaries
|
||||
echo ""
|
||||
|
|
Loading…
Reference in a new issue