Skip to content

Update dependencies #25

Update dependencies

Update dependencies #25

Workflow file for this run

name: Nightly Build
on:
push:
branches: [master]
env:
CARGO_TERM_COLOR: always
permissions:
contents: write
jobs:
build:
name: Build (${{ matrix.target }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
cross: false
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
cross: true
- target: aarch64-apple-darwin
os: macos-latest
cross: false
- target: x86_64-pc-windows-msvc
os: windows-latest
cross: false
- target: aarch64-pc-windows-msvc
os: windows-latest
cross: false
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- uses: actions/cache@v5
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-${{ matrix.target }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.target }}-cargo-
- name: Install cross
if: matrix.cross
run: cargo install cross --force --git https://github.com/cross-rs/cross
- name: Build (cross)
if: matrix.cross
run: cross build --release --locked --target ${{ matrix.target }}
- name: Build (native)
if: "!matrix.cross"
run: cargo build --release --locked --target ${{ matrix.target }}
- name: Rename binary (Unix)
if: runner.os != 'Windows'
run: cp target/${{ matrix.target }}/release/cs cs-${{ matrix.target }}
- name: Rename binary (Windows)
if: runner.os == 'Windows'
run: cp target/${{ matrix.target }}/release/cs.exe cs-${{ matrix.target }}.exe
- name: Upload artifact (Unix)
if: runner.os != 'Windows'
uses: actions/upload-artifact@v7
with:
name: cs-${{ matrix.target }}
path: cs-${{ matrix.target }}
- name: Upload artifact (Windows)
if: runner.os == 'Windows'
uses: actions/upload-artifact@v7
with:
name: cs-${{ matrix.target }}
path: cs-${{ matrix.target }}.exe
release:
name: Publish nightly release
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/download-artifact@v8
with:
path: artifacts/
- name: Flatten artifacts
run: |
mkdir -p release/
find artifacts/ -type f -exec mv {} release/ \;
ls -la release/
- name: Create/update nightly release
uses: softprops/action-gh-release@v2
with:
tag_name: nightly
name: Nightly Build
body: |
Automated nightly build from `master` branch.
**Commit:** ${{ github.sha }}
**Date:** ${{ github.event.head_commit.timestamp }}
These are development builds — use at your own risk.
prerelease: true
make_latest: false
files: release/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}