-
Notifications
You must be signed in to change notification settings - Fork 114
48 lines (48 loc) · 1.51 KB
/
build.yaml
File metadata and controls
48 lines (48 loc) · 1.51 KB
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
name: "Build"
on:
push:
workflow_dispatch:
jobs:
build:
strategy:
fail-fast: false
matrix:
distro:
- humble
- jazzy
- kilted
- rolling
system:
- x86_64-linux
- aarch64-linux
runs-on: ${{ (matrix.system == 'x86_64-linux') && 'ubuntu-latest' || 'ubuntu-24.04-arm' }}
concurrency:
group: ${{ github.workflow }}-${{ matrix.distro }}-${{ matrix.system }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v31.8.1
with:
extra_nix_config: |
max-jobs = 2
cores = 2
- uses: cachix/cachix-action@v15
with:
name: ros
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
skipPush: true
- uses: ./.github/actions/nix-ros-build-action
with:
root-attribute: 'rosPackages.${{ matrix.distro }}'
system: '${{ matrix.system }}'
eval-jobs: 4
build-jobs: 2
- name: "Pin built packages in the cache"
if: ${{ github.ref_name == 'master' || github.ref_name == 'develop' }}
run: |
cachixCache=ros
pinName=${{ format('{0}-{1}-{2}', github.ref_name , matrix.distro, matrix.system) }}
linkFarm=$(nix-build linkFarm.nix --argstr name "$pinName")
cachix push $cachixCache $linkFarm
cachix pin $cachixCache $pinName $linkFarm --keep-revisions 1
nix-store --query --references $linkFarm | xargs du -shc | sort -h