style: cargo fmt #32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
'on': | |
merge_group: | |
branches: | |
- master | |
- main | |
pull_request: | |
branches: | |
- master | |
- main | |
push: | |
branches: | |
- master | |
- main | |
tags: | |
- v* | |
workflow_dispatch: {} | |
jobs: | |
build: | |
name: Build | |
runs-on: ${{matrix.os}} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@v4 | |
- name: Magic Nix Cache | |
uses: DeterminateSystems/magic-nix-cache-action@v2 | |
- name: Build ${{ matrix.target }} binary | |
run: | | |
nix build -L .#${{matrix.target.derivation}} | |
mkdir artifacts/ | |
cp result/bin/* artifacts | |
cd artifacts | |
ls | xargs -I{} mv {} ${{matrix.target.name}}-{} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: "${{ matrix.target.name }}-sync_dis_boi" | |
path: "artifacts/*" | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
target: | |
- derivation: x86_64-unknown-linux-musl | |
name: linux-x86_64 | |
- derivation: aarch64-unknown-linux-musl | |
name: linux-aarch64 | |
- derivation: x86_64-pc-windows-gnu | |
name: windows-x86_64 | |
include: | |
- os: macos-latest | |
target: | |
derivation: "" | |
name: mac-aarch64 | |
release: | |
name: Release | |
needs: build | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
path: "artifacts" | |
pattern: "*-sync_dis_boi" | |
merge-multiple: true | |
- name: Display structure of downloaded files | |
run: ls -R | |
- uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "artifacts/*" | |
flake: | |
name: Flake self-check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check Nix flake inputs | |
uses: DeterminateSystems/flake-checker-action@v5 | |
with: | |
fail-mode: true |