-
Notifications
You must be signed in to change notification settings - Fork 3
77 lines (58 loc) · 1.72 KB
/
gh-build-iso-cuda.yml
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
74
75
76
77
name: Build ISO on hosted runner (CUDA, normal)
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Cleanup
uses: rokibhasansagar/slimhub_actions@main
with:
retain: "docker_buildkit,docker_imgcache"
- name: Checkout repository
uses: actions/checkout@v4
- name: Cache packages
uses: actions/cache@v4
with:
key: packages-cuda-normal
path: /var/cache/pacman/pkg
- name: Build image
uses: addnab/docker-run-action@v3
with:
image: archlinux:latest
options: --privileged --rm --volume /var/cache/pacman/pkg:/var/cache/pacman/pkg --volume ${{ github.workspace }}:/workspace
run: |
# Exit on error
set -eu
# Enter project directory
pushd /workspace
# Install dependencies
.ci/dependencies.sh
# Patch mkarchiso
.ci/mkarchiso.sh
# Configure to use CUDA
.ci/configure.py cuda normal
popd
# Build image
mkarchiso -v -m iso -w /var/tmp/work -o /workspace/out /workspace
- name: Create summary
run: |
# Exit on error
set -eu
# Start code section
echo '`' > "$GITHUB_STEP_SUMMARY"
# Print checksums
sha256sum out/* | sed 's/out\///' >> "$GITHUB_STEP_SUMMARY"
# End code section
echo '`' >> "$GITHUB_STEP_SUMMARY"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: archiso-output
path: out/