mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-03 18:30:32 +08:00
55 lines
1.6 KiB
YAML
55 lines
1.6 KiB
YAML
name: build
|
|
on:
|
|
push: { branches: [ '*' ] }
|
|
workflow_dispatch:
|
|
concurrency:
|
|
group: ${{ github.sha }}
|
|
cancel-in-progress: true
|
|
permissions:
|
|
contents: read
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os:
|
|
- macos-26 # arm64
|
|
- macos-26-intel # x64
|
|
- ubuntu-26.04-arm # arm64
|
|
- ubuntu-26.04 # x64
|
|
- windows-11-arm # arm64
|
|
- windows-2025 # x64
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
with:
|
|
fetch-depth: 512
|
|
fetch-tags: true
|
|
filter: 'tree:0'
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- if: runner.os == 'Windows'
|
|
run: git config --system core.autocrlf false
|
|
- uses: actions/cache@v6
|
|
with:
|
|
path: ~/.cargo
|
|
key: ${{ matrix.os }}-${{ runner.arch }}-${{ hashFiles('Cargo.lock') }}-cargo-home
|
|
- uses: actions/cache@v6
|
|
with:
|
|
path: target
|
|
key: ${{ matrix.os }}-${{ runner.arch }}-${{ hashFiles('Cargo.lock') }}-cargo-target
|
|
- run: cargo build --workspace --verbose --all-features
|
|
- if: runner.os == 'Windows'
|
|
working-directory: windows
|
|
run: |
|
|
$env:RADICLE_VERSION = "$(.\version.ps1)"
|
|
echo $env:RADICLE_VERSION
|
|
dotnet build
|
|
- if: runner.os == 'Windows'
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: radicle-installer-${{ runner.arch }}-${{ github.sha }}-${{ github.job }}
|
|
path: windows/bin/*/*.msi
|
|
- run: cargo test --workspace --verbose --all-features -- --nocapture
|
|
env:
|
|
RUST_BACKTRACE: full
|