splitting up builds
This commit is contained in:
committed by
Phoenix
parent
fe8c8230d1
commit
0b50dd47c1
73
.github/workflows/build-gurty.yml
vendored
Normal file
73
.github/workflows/build-gurty.yml
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
name: Build Gurty
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'protocol/cli/**'
|
||||
- 'protocol/library/**'
|
||||
- '.github/workflows/build-gurty.yml'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'protocol/cli/**'
|
||||
- 'protocol/library/**'
|
||||
- '.github/workflows/build-gurty.yml'
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
build-gurty:
|
||||
name: Build Gurty
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
target: x86_64-unknown-linux-gnu
|
||||
platform: linux
|
||||
ext: ""
|
||||
- os: windows-latest
|
||||
target: x86_64-pc-windows-msvc
|
||||
platform: windows
|
||||
ext: ".exe"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
targets: ${{ matrix.target }}
|
||||
|
||||
- name: Cache cargo dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry/index/
|
||||
~/.cargo/registry/cache/
|
||||
~/.cargo/git/db/
|
||||
protocol/target/
|
||||
key: ${{ runner.os }}-gurty-${{ hashFiles('protocol/cli/Cargo.lock', 'protocol/library/Cargo.toml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gurty-
|
||||
${{ runner.os }}-cargo-
|
||||
|
||||
- name: Build Gurty
|
||||
run: |
|
||||
cd protocol/cli
|
||||
cargo build --release --target ${{ matrix.target }}
|
||||
|
||||
- name: Prepare artifacts
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p artifacts/${{ matrix.platform }}
|
||||
cp protocol/cli/target/${{ matrix.target }}/release/gurty${{ matrix.ext }} artifacts/${{ matrix.platform }}/
|
||||
|
||||
- name: Upload Gurty artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: gurty-${{ matrix.platform }}
|
||||
path: artifacts/${{ matrix.platform }}
|
||||
retention-days: 30
|
||||
Reference in New Issue
Block a user