Repository navigation
119 lines (99 loc) · 2.83 KB
/
Copy pathci.yml
File metadata and controls
119 lines (99 loc) · 2.83 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
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
---
name: CI
on:
workflow_call: ~
pull_request:
push:
branches:
- main
permissions:
contents: read
env:
# Ref: https://docs.astral.sh/uv/concepts/projects/sync/#checking-if-the-lockfile-is-up-to-date
UV_FROZEN: "true"
## Concurrency only allowed in the main branch.
## So old builds running for old commits within the same Pull Request are cancelled
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install environment
uses: ./.github/workflows/env-install
- name: Run tests
run: uv run poe test
# The bundle is packaged in the job building it: artifacts don't keep file modes
package:
permissions:
id-token: write
attestations: write
artifact-metadata: write
strategy:
matrix:
os:
- runner: ubuntu-24.04
target: linux-amd64
- runner: ubuntu-24.04-arm
target: linux-arm64
runs-on: ${{ matrix.os.runner }}
steps:
- uses: actions/checkout@v7
- name: Install environment
uses: ./.github/workflows/env-install
- name: Build
run: uv run poe build
- name: Build deb packages
run: uv run poe package:deb
- name: Build rpm packages
run: uv run poe package:rpm
- name: Build apk packages
run: uv run poe package:apk
- uses: actions/attest@v4
with:
subject-path: |
dist/*.deb
dist/*.rpm
dist/*.apk
- uses: actions/upload-artifact@v7
with:
name: ignity-package-${{ matrix.os.target }}
path: |
dist/*.deb
dist/*.rpm
dist/*.apk
# Run the whole suite with ignity installed from its package
sanitize:
needs:
- package
strategy:
fail-fast: false
matrix:
os:
- runner: ubuntu-24.04
target: linux-amd64
- runner: ubuntu-24.04-arm
target: linux-arm64
# Not ubuntu: its image already has a uid/gid 1000 user, which the tests map
base:
- debian:bookworm-slim
- alpine:3
- fedora:latest
runs-on: ${{ matrix.os.runner }}
steps:
- uses: actions/checkout@v7
- name: Install environment
uses: ./.github/workflows/env-install
- name: Install podman
run: command -v podman || { sudo apt-get update && sudo apt-get install -y podman; }
- uses: actions/download-artifact@v8
with:
name: ignity-package-${{ matrix.os.target }}
path: dist
- name: Run tests
run: uv run poe test
env:
IGNITY_INSTALL: package
DOCKER_BASE_IMAGE: ${{ matrix.base }}