-
Notifications
You must be signed in to change notification settings - Fork 3
73 lines (58 loc) · 1.84 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Build artifacts
on:
workflow_dispatch:
workflow_call:
pull_request:
push:
branches: [main]
jobs:
build-artifacts-X64-Linux:
runs-on: UbuntuLatest32Cores128G
permissions:
id-token: "write"
contents: "read"
steps:
- uses: actions/checkout@v3
- uses: DeterminateSystems/flake-checker-action@main
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
with:
use-gha-cache: false
- name: "Nix formatting"
run: git ls-files '*.nix' | nix develop --command xargs nixpkgs-fmt --check
- name: "Rust formatting"
run: nix develop --command cargo fmt --check
- name: "Clippy"
run: nix develop --command cargo clippy --all-targets --all-features -- -Dwarnings
- name: "Nix Flake Check"
run: nix flake check --all-systems --print-build-logs
- name: Build package
run: "nix build .# -L --fallback"
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4.4.0
with:
# Artifact name
name: flakehub-push-X64-Linux
path: result/bin/flakehub-push
retention-days: 1
# For local development purposes
build-artifacts-macos:
runs-on: ${{ matrix.systems.runner }}
permissions:
id-token: "write"
contents: "read"
strategy:
matrix:
systems:
- nix-system: aarch64-darwin
runner: macos-latest-xlarge
- nix-system: x86_64-darwin
runner: macos-13-large
steps:
- uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
with:
use-gha-cache: false
- name: Build package
run: "nix build .# -L --fallback"