-
Notifications
You must be signed in to change notification settings - Fork 36
112 lines (107 loc) · 3.58 KB
/
cache_builder.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
name: "[master]-cache-build"
on:
schedule:
- cron: "30 10 * * *"
workflow_dispatch:
jobs:
buildrun:
name: "build"
env:
DISTRO: scatest
SCM_BRANCH: master
BUILD_MAXRUNTIME: 20000
PYTHONIOENCODING: utf8
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
LANGUAGE: en_US.UTF-8
runs-on: ubuntu-latest
container:
image: privkweihmann/yocto-sca-minimal:2004
env:
WORKSPACE: /opt/build
TOPDIR: /opt/build
TEMPLATECONF: /opt/build/sources/meta-sca/conf/templates/scatest-qemux86-64/
volumes:
- ${{ github.workspace }}:/opt/build
options: --privileged --user=yoctouser
steps:
- name: setup (container)
uses: priv-kweihmann/meta-sca-ci-utils/preparecontainer@latest
- name: setup (caches)
run: |
mkdir -p ${WORKSPACE}/sstate-cache
shell: bash
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d-%H-%M-%S')" >> $GITHUB_OUTPUT
- name: additional setup (caches)
uses: actions/cache@v3
with:
path: /opt/build/sstate-cache
key: sca-glibc-${{ steps.date.outputs.date }}
- name: checkout (poky)
uses: priv-kweihmann/meta-sca-ci-utils/addlayer@latest
with:
repo: git://git.yoctoproject.org/poky.git
branch: ${{ env.SCM_BRANCH }}
add-layer: "0"
- name: checkout (meta-sca)
uses: priv-kweihmann/meta-sca-ci-utils/addlayer@latest
with:
repo: https://github.com/priv-kweihmann/meta-sca.git
branch: ${{ env.SCM_BRANCH }}
- name: configure (caches)
uses: priv-kweihmann/meta-sca-ci-utils/addvar@latest
with:
variable: SSTATE_DIR
value: /opt/build/sstate-cache
- name: build (glibc)
uses: priv-kweihmann/meta-sca-ci-utils/buildstep@latest
with:
target: glibc
ignore-exit-codes: 124 137 1
- name: build (rust 1/4)
uses: priv-kweihmann/meta-sca-ci-utils/buildstep@latest
with:
target: "rust-llvm-native"
ignore-exit-codes: 124 137 1
- name: build (rust 2/4)
uses: priv-kweihmann/meta-sca-ci-utils/buildstep@latest
with:
target: "rust-native"
ignore-exit-codes: 124 137 1
- name: build (rust 3/4)
uses: priv-kweihmann/meta-sca-ci-utils/buildstep@latest
with:
target: "cargo-native"
ignore-exit-codes: 124 137 1
- name: build (rust 4/4)
uses: priv-kweihmann/meta-sca-ci-utils/buildstep@latest
with:
target: "cargo"
ignore-exit-codes: 124 137 1
- name: build (tools 1/2)
uses: priv-kweihmann/meta-sca-ci-utils/buildstep@latest
with:
target: "openssl perl"
ignore-exit-codes: 124 137 1
- name: build (tools 2/2)
uses: priv-kweihmann/meta-sca-ci-utils/buildstep@latest
with:
target: "qemu-system-native"
ignore-exit-codes: 124 137 1
- name: build
uses: priv-kweihmann/meta-sca-ci-utils/buildstep@latest
with:
target: "core-image-minimal-scatest bad-go bad-package"
ignore-exit-codes: 124 137 1
- name: print disk usage
if: always()
uses: priv-kweihmann/meta-sca-ci-utils/diskusage@latest
- name: cleanup workspace
if: always()
run: |
# to have enough disk space left to compress the caches
# we need to remove a bit of the stuff we don't need
# anymore, such as TMPDIR
rm -rf /opt/build/build/tmp