forked from fwupd/fwupd
-
Notifications
You must be signed in to change notification settings - Fork 0
116 lines (111 loc) · 3.67 KB
/
matrix.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
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
on:
workflow_call:
jobs:
build:
runs-on: ubuntu-latest
needs: library
strategy:
matrix:
os: [fedora, debian-x86_64, arch, debian-i386]
steps:
- uses: actions/checkout@v4
- name: Docker login
run: docker login docker.pkg.github.com -u $GITHUB_ACTOR -p $GITHUB_TOKEN
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Download tarball
if: matrix.os == 'fedora'
uses: actions/download-artifact@v4
id: download
with:
name: tarball
- name: Build in container
env:
CI_NETWORK: true
CI: true
VERSION: ${{ needs.library.outputs.version }}
run: |
docker run --privileged -e CI_NETWORK=$CI_NETWORK -e CI=$CI -e VERSION=$VERSION -t -v $GITHUB_WORKSPACE:/github/workspace docker.pkg.github.com/fwupd/fwupd/fwupd-${{matrix.os}}:latest
- name: Save any applicable artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}
path: ${{ github.workspace }}/dist/*
if-no-files-found: ignore
test:
strategy:
matrix:
os: [fedora, debian-i386, arch, debian-x86_64]
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
id: download
with:
name: ${{ matrix.os }}
- name: Docker login
run: docker login docker.pkg.github.com -u $GITHUB_ACTOR -p $GITHUB_TOKEN
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Test in container
env:
CI_NETWORK: true
CI: true
run: |
docker run --privileged -e CI=true -t -v $GITHUB_WORKSPACE:/github/workspace docker.pkg.github.com/fwupd/fwupd/fwupd-${{matrix.os}}:latest contrib/ci/${{matrix.os}}-test.sh
openbmc:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Refresh dependencies
run: sudo apt update
- name: Install dependencies
run: |
sudo ./contrib/ci/fwupd_setup_helpers.py install-dependencies -o ubuntu --yes
sudo ./contrib/ci/fwupd_setup_helpers.py test-meson
- name: Build
run: |
./contrib/build-openbmc.sh --prefix=/home/runner/.root
library:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- uses: actions/checkout@v4
- name: Refresh dependencies
run: sudo apt update
- name: Install dependencies
run: |
sudo ./contrib/ci/fwupd_setup_helpers.py install-dependencies -o ubuntu --yes
sudo ./contrib/ci/fwupd_setup_helpers.py test-meson
- name: Build
run: |
meson setup build \
-Dbuild=library \
-Ddocs=disabled \
-Dman=false \
-Dauto_features=disabled \
-Dtests=false
ninja -C build dist
- name: Save version
id: version
run: |
echo "version=$(meson introspect build --projectinfo | jq -r .version)" >> $GITHUB_OUTPUT
- name: Save tarball
uses: actions/upload-artifact@v4
with:
name: tarball
path: ${{ github.workspace }}/build/meson-dist/*xz
macos:
runs-on: macos-12
steps:
- name: install dependencies
run: |
brew install meson libgusb gobject-introspection sqlite libarchive json-glib curl gnutls protobuf-c vala gi-docgen
python3 -m pip install --user jinja2
- uses: actions/checkout@v4
- name: configure
run: ./contrib/ci/build_macos.sh
- name: build
run: ninja -C build-macos