-
Notifications
You must be signed in to change notification settings - Fork 46
119 lines (108 loc) · 3.12 KB
/
packages.yaml
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: 'packages'
on:
- 'pull_request'
- 'push'
jobs:
packages:
runs-on: 'ubuntu-22.04'
strategy:
fail-fast: false
matrix:
container_os:
- 'debian:11-slim'
- 'debian:12-slim'
- 'redhat/ubi8:latest'
- 'redhat/ubi9:latest'
- 'ubuntu:20.04'
- 'ubuntu:22.04'
- 'ubuntu:24.04'
arch:
- 'amd64'
- 'arm32v7'
- 'aarch64'
os:
- ''
exclude:
# More investigation needed for RHEL 8 and 9. Excluding for now.
- container_os: 'redhat/ubi8:latest'
arch: 'arm32v7'
- container_os: 'redhat/ubi8:latest'
arch: 'aarch64'
- container_os: 'redhat/ubi9:latest'
arch: 'arm32v7'
- container_os: 'redhat/ubi9:latest'
arch: 'aarch64'
# Include this for mariner package builds. Mariner cannot be built on its own OS so we need an Ubuntu container.
include:
- container_os: 'ubuntu:20.04'
arch: 'amd64'
os: 'mariner:2'
steps:
- uses: 'actions/checkout@v3'
with:
submodules: 'recursive'
- name: 'Run'
run: |
sudo df -h
sudo rm -rf /usr/local
sudo df -h
docker run --rm \
-v "$GITHUB_WORKSPACE:/src" \
-e "ARCH=$ARCH" \
-e "OS=$OS" \
-e "PACKAGE_VERSION=$PACKAGE_VERSION" \
-e "PACKAGE_RELEASE=$PACKAGE_RELEASE" \
--privileged \
"${{ matrix.container_os }}" \
'/src/ci/package.sh'
env:
ARCH: "${{ matrix.arch }}"
OS: "${{ matrix.os }}"
PACKAGE_VERSION: '1.5.4'
# PACKAGE_RELEASE should always be '1'.
PACKAGE_RELEASE: '1'
- name: 'Generate artifact properties'
id: 'generate-artifact-properties'
run: |
OS="${{ matrix.os }}"
if [ -z "$OS" ]; then
os_package="${{ matrix.container_os }}"
else
os_package="$OS"
fi
os_package="$(sed -e 's@[:/]@-@g' <<< "$os_package")"
echo "artifact-name=packages_${os_package}_${{ matrix.arch }}" >> $GITHUB_OUTPUT
- name: 'Upload'
uses: 'actions/upload-artifact@v4'
with:
name: "${{ steps.generate-artifact-properties.outputs.artifact-name }}"
path: 'packages'
snap:
strategy:
fail-fast: false
matrix:
runner:
- arch: amd64
pool: iot-identity-1es-hosted-linux-amd64
image: agent-aziotedge-ubuntu-22.04-msmoby
- arch: aarch64
pool: iot-identity-1es-hosted-linux-arm64
image: agent-aziotedge-ubuntu-22.04-arm64-msmoby
runs-on:
- self-hosted
- 1ES.Pool=${{ matrix.runner.pool }}
- 1ES.ImageOverride=${{ matrix.runner.image }}
steps:
- uses: 'actions/checkout@v3'
with:
submodules: 'recursive'
- name: 'Run'
uses: 'snapcore/action-build@v1'
id: 'snapcraft'
with:
build-info: true
- name: 'Upload'
uses: 'actions/upload-artifact@v4'
with:
name: 'packages_snap_${{ matrix.runner.arch }}'
path: '${{ steps.snapcraft.outputs.snap }}'