-
Notifications
You must be signed in to change notification settings - Fork 674
194 lines (186 loc) · 11.2 KB
/
Copy pathpackage-linux.yml
File metadata and controls
194 lines (186 loc) · 11.2 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
name: Linux Packages
on:
workflow_dispatch:
push:
branches:
- main
- release/*
pull_request:
branches:
- main
- release/*
concurrency:
# Cancel any workflow currently in progress for the same PR.
# Allow running concurrently with any other commits.
group: package-linux-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
permissions: read-all
jobs:
build-packages:
name: Generate Linux Packages
needs: []
strategy:
fail-fast: false
matrix:
vec: [
{ config: "Release", os: "ubuntu-22.04", arch: "arm", tls: "quictls" },
{ config: "Release", os: "ubuntu-22.04", arch: "arm64", tls: "quictls" },
{ config: "Release", os: "ubuntu-22.04", arch: "x64", tls: "quictls" },
{ config: "Release", os: "ubuntu-24.04", arch: "arm", tls: "quictls", time64: "-Time64Distro" },
{ config: "Release", os: "ubuntu-24.04", arch: "arm64", tls: "quictls", time64: "-Time64Distro" },
{ config: "Release", os: "ubuntu-24.04", arch: "x64", tls: "quictls", time64: "-Time64Distro" },
]
uses: ./.github/workflows/package-reuse-linux.yml
with:
config: ${{ matrix.vec.config }}
os: ${{ matrix.vec.os }}
arch: ${{ matrix.vec.arch }}
tls: ${{ matrix.vec.tls }}
time64: ${{ matrix.vec.time64 }}
test-packages:
name: Test Linux Packages
needs: [build-packages]
strategy:
fail-fast: false
matrix:
vec: [
{ config: "Release", os: "ubuntu-22.04", arch: "x64", tls: "quictls" },
{ config: "Release", os: "ubuntu-24.04", arch: "x64", tls: "quictls" },
]
runs-on: ${{ matrix.vec.os }}
steps:
- name: Download Package
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
with:
name: ${{ matrix.vec.config }}-linux-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}-UseSystemOpenSSLCrypto
path: artifacts
- name: Download Build Artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
with:
name: Package-${{ matrix.vec.config }}-linux-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}-UseSystemOpenSSLCrypto
path: artifacts
- name: Install Package
run: |
sudo apt-add-repository ppa:lttng/stable-2.13
sudo apt-get update
sudo apt-get install -y lttng-tools
sudo find -name "*.deb" -exec sudo apt install -y ./{} \;
rm artifacts/bin/linux/${{ matrix.vec.arch }}_${{ matrix.vec.config }}_${{ matrix.vec.tls }}/libmsquic.so*
ls artifacts/bin/linux/${{ matrix.vec.arch }}_${{ matrix.vec.config }}_${{ matrix.vec.tls }}
- name: Test
run: |
chmod +x artifacts/bin/linux/${{ matrix.vec.arch }}_${{ matrix.vec.config }}_${{ matrix.vec.tls }}/msquictest
artifacts/bin/linux/${{ matrix.vec.arch }}_${{ matrix.vec.config }}_${{ matrix.vec.tls }}/msquictest --gtest_filter=ParameterValidation.ValidateApi
test-packages-on-docker:
name: Test Linux Packages
needs: [build-packages]
strategy:
fail-fast: false
matrix:
vec: [
# Ubuntu 22.04 - DEB
{ friendlyName: "Ubuntu 22.04 x64", config: "Release", os: "ubuntu-22.04", arch: "x64", tls: "quictls", image: "ubuntu:22.04" },
{ friendlyName: "Ubuntu 22.04 ARM32", config: "Release", os: "ubuntu-22.04", arch: "arm", tls: "quictls", image: "ubuntu:22.04" },
{ friendlyName: "Ubuntu 22.04 ARM64", config: "Release", os: "ubuntu-22.04", arch: "arm64", tls: "quictls", image: "ubuntu:22.04" },
# Ubuntu 24.04 - DEB
{ friendlyName: "Ubuntu 24.04 x64", config: "Release", os: "ubuntu-24.04", arch: "x64", tls: "quictls", image: "ubuntu:24.04" },
{ friendlyName: "Ubuntu 24.04 ARM32", config: "Release", os: "ubuntu-24.04", arch: "arm", tls: "quictls", image: "ubuntu:24.04" },
{ friendlyName: "Ubuntu 24.04 ARM64", config: "Release", os: "ubuntu-24.04", arch: "arm64", tls: "quictls", image: "ubuntu:24.04" },
# Debian 12 - DEB
{ friendlyName: "Debian 12 x64", config: "Release", os: "ubuntu-22.04", arch: "x64", tls: "quictls", image: "debian:12" },
{ friendlyName: "Debian 12 ARM32", config: "Release", os: "ubuntu-22.04", arch: "arm", tls: "quictls", image: "debian:12" },
{ friendlyName: "Debian 12 ARM64", config: "Release", os: "ubuntu-22.04", arch: "arm64", tls: "quictls", image: "debian:12" },
# Debian 13 - DEB
{ friendlyName: "Debian 13 x64", config: "Release", os: "ubuntu-22.04", arch: "x64", tls: "quictls", image: "debian:trixie" },
{ friendlyName: "Debian 13 ARM32", config: "Release", os: "ubuntu-24.04", arch: "arm", tls: "quictls", image: "debian:trixie" },
{ friendlyName: "Debian 13 ARM64", config: "Release", os: "ubuntu-22.04", arch: "arm64", tls: "quictls", image: "debian:trixie" },
# Azure Linux 3.0 - RPM (no arm32)
{ friendlyName: "Azure Linux 3.0 x64", config: "Release", os: "ubuntu-24.04", arch: "x64", tls: "quictls", image: "mcr.microsoft.com/azurelinux/base/core:3.0" },
{ friendlyName: "Azure Linux 3.0 ARM64", config: "Release", os: "ubuntu-24.04", arch: "arm64", tls: "quictls", image: "mcr.microsoft.com/azurelinux/base/core:3.0" },
# CentOS Stream 9 - RPM (no arm32)
{ friendlyName: "CentOS Stream 9 x64", config: "Release", os: "ubuntu-22.04", arch: "x64", tls: "quictls", image: "quay.io/centos/centos:stream9" },
{ friendlyName: "CentOS Stream 9 ARM64", config: "Release", os: "ubuntu-22.04", arch: "arm64", tls: "quictls", image: "quay.io/centos/centos:stream9" },
# CentOS Stream 10 - RPM (no arm32)
{ friendlyName: "CentOS Stream 10 x64", config: "Release", os: "ubuntu-22.04", arch: "x64", tls: "quictls", image: "quay.io/centos/centos:stream10" },
{ friendlyName: "CentOS Stream 10 ARM64", config: "Release", os: "ubuntu-22.04", arch: "arm64", tls: "quictls", image: "quay.io/centos/centos:stream10" },
# RHEL 9 - RPM (no arm32)
{ friendlyName: "RHEL 9 x64", config: "Release", os: "ubuntu-22.04", arch: "x64", tls: "quictls", image: "registry.access.redhat.com/ubi9/ubi:latest" },
{ friendlyName: "RHEL 9 ARM64", config: "Release", os: "ubuntu-22.04", arch: "arm64", tls: "quictls", image: "registry.access.redhat.com/ubi9/ubi:latest" },
# Fedora 42 - RPM (no arm32)
{ friendlyName: "Fedora 42 x64", config: "Release", os: "ubuntu-22.04", arch: "x64", tls: "quictls", image: "fedora:42" },
{ friendlyName: "Fedora 42 ARM64", config: "Release", os: "ubuntu-22.04", arch: "arm64", tls: "quictls", image: "fedora:42" },
# Fedora 43 - RPM (no arm32)
{ friendlyName: "Fedora 43 x64", config: "Release", os: "ubuntu-22.04", arch: "x64", tls: "quictls", image: "fedora:43" },
{ friendlyName: "Fedora 43 ARM64", config: "Release", os: "ubuntu-22.04", arch: "arm64", tls: "quictls", image: "fedora:43" },
# openSUSE 15.6 - RPM (no arm32)
{ friendlyName: "openSUSE 15.6 x64", config: "Release", os: "ubuntu-22.04", arch: "x64", tls: "quictls", image: "opensuse/leap:15.6" },
{ friendlyName: "openSUSE 15.6 ARM64", config: "Release", os: "ubuntu-22.04", arch: "arm64", tls: "quictls", image: "opensuse/leap:15.6" },
# openSUSE 16.0 - RPM (no arm32)
{ friendlyName: "openSUSE 16.0 x64", config: "Release", os: "ubuntu-22.04", arch: "x64", tls: "quictls", image: "opensuse/leap:16.0" },
{ friendlyName: "openSUSE 16.0 ARM64", config: "Release", os: "ubuntu-22.04", arch: "arm64", tls: "quictls", image: "opensuse/leap:16.0" },
# SLES 15.6 - RPM (no arm32)
{ friendlyName: "SLES 15.6 x64", config: "Release", os: "ubuntu-22.04", arch: "x64", tls: "quictls", image: "registry.suse.com/suse/sle15:15.6" },
{ friendlyName: "SLES 15.6 ARM64", config: "Release", os: "ubuntu-22.04", arch: "arm64", tls: "quictls", image: "registry.suse.com/suse/sle15:15.6" },
# SLES 15.7 - RPM (no arm32)
{ friendlyName: "SLES 15.7 x64", config: "Release", os: "ubuntu-22.04", arch: "x64", tls: "quictls", image: "registry.suse.com/suse/sle15:15.7" },
{ friendlyName: "SLES 15.7 ARM64", config: "Release", os: "ubuntu-22.04", arch: "arm64", tls: "quictls", image: "registry.suse.com/suse/sle15:15.7" },
# SLES 16 - RPM (no arm32)
{ friendlyName: "SLES 16 x64", config: "Release", os: "ubuntu-22.04", arch: "x64", tls: "quictls", image: "registry.suse.com/bci/bci-base:16.0" },
{ friendlyName: "SLES 16 ARM64", config: "Release", os: "ubuntu-22.04", arch: "arm64", tls: "quictls", image: "registry.suse.com/bci/bci-base:16.0" },
]
runs-on: ${{ matrix.vec.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
- name: Download Package
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
with:
name: Package-${{ matrix.vec.config }}-linux-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}-UseSystemOpenSSLCrypto
path: artifacts
- name: Download Build Artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
with:
name: ${{ matrix.vec.config }}-linux-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}-UseSystemOpenSSLCrypto
path: artifacts
- name: Set up QEMU
uses: docker/setup-qemu-action@06116385d9baf250c9f4dcb4858b16962ea869c3
- name: Set up .NET
uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2
with:
dotnet-version: 10.0.x
- name: Build .NET QUIC Test Projects (Self-Contained)
run: |
# Map arch to runtime identifier
case "${{ matrix.vec.arch }}" in
x64) RID="linux-x64" ;;
arm64) RID="linux-arm64" ;;
arm) RID="linux-arm" ;;
esac
# Build .NET 10 self-contained executable
pushd src/cs/QuicSimpleTest
dotnet publish QuicHello.net10.0.csproj -r $RID -c ${{ matrix.vec.config }} -o artifacts/net10.0 --self-contained true /p:PublishSingleFile=true
popd
# Build .NET 9 self-contained executable
pushd src/cs/QuicSimpleTest
dotnet publish QuicHello.net9.0.csproj -r $RID -c ${{ matrix.vec.config }} -o artifacts/net9.0 --self-contained true /p:PublishSingleFile=true
popd
- name: Docker Run
run: |
# Map arch to Docker platform
case "${{ matrix.vec.arch }}" in
x64) PLATFORM="linux/amd64" ;;
arm64) PLATFORM="linux/arm64" ;;
arm) PLATFORM="linux/arm/v7" ;;
esac
docker run --platform $PLATFORM -v $(pwd):/main ${{ matrix.vec.image }} /main/scripts/docker-script.sh ${{ matrix.vec.arch }} ${{ matrix.vec.config }} ${{ matrix.vec.tls }}
Complete:
name: Package Linux Complete
if: always()
needs: [build-packages, test-packages, test-packages-on-docker]
runs-on: ubuntu-latest
permissions: {} # No need for any permissions.
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe
with:
jobs: ${{ toJSON(needs) }}