-
Notifications
You must be signed in to change notification settings - Fork 4
90 lines (86 loc) · 3.2 KB
/
debian.yml
File metadata and controls
90 lines (86 loc) · 3.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
name: Debian
on:
push:
paths:
- .github/workflows/debian.yml
- docker/debian/Dockerfile
env:
DOCKER_REGISTRY: ghcr.io
DOCKER_BUILDKIT: 1
BUILDKIT_PROGRESS: plain
CONAN_VERSION: 2.17.0
jobs:
# Build the Docker image for Debian using different versions of GCC.
gcc:
runs-on: ubuntu-latest
strategy:
matrix:
version:
- os: bookworm
gcc: 12
- os: bookworm
gcc: 13
- os: bookworm
gcc: 14
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ${DOCKER_REGISTRY} -u ${{ github.repository_owner }} --password-stdin
- name: Determine the Docker image name.
run: |
# Convert the repository name to lowercase as the organization name is
# uppercase, which is not permitted by the Docker registry.
DOCKER_REPOSITORY=${GITHUB_REPOSITORY,,}
echo "DOCKER_IMAGE=${DOCKER_REGISTRY}/${DOCKER_REPOSITORY}/debian-${{ matrix.version.os }}:gcc${{ matrix.version.gcc }}" >> $GITHUB_ENV
- name: Build the Docker image
working-directory: docker/debian
run: |
docker build . \
--target gcc \
--build-arg GITHUB_REPO=${GITHUB_REPOSITORY} \
--build-arg DEBIAN_VERSION=${{ matrix.version.os }} \
--build-arg GCC_VERSION=${{ matrix.version.gcc }} \
--build-arg CONAN_VERSION=${{ env.CONAN_VERSION }} \
--tag ${{ env.DOCKER_IMAGE }}
- name: Push the Docker image
run: docker push ${{ env.DOCKER_IMAGE }}
# Build the Docker image for Debian using different versions of Clang.
clang:
runs-on: ubuntu-latest
strategy:
matrix:
version:
- os: bookworm
clang: 16
- os: bookworm
clang: 17
- os: bookworm
clang: 18
- os: bookworm
clang: 19
- os: bookworm
clang: 20
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ${DOCKER_REGISTRY} -u ${{ github.repository_owner }} --password-stdin
- name: Determine the Docker image name.
run: |
# Convert the repository name to lowercase as the organization name is
# uppercase, which is not permitted by the Docker registry.
DOCKER_REPOSITORY=${GITHUB_REPOSITORY,,}
echo "DOCKER_IMAGE=${DOCKER_REGISTRY}/${DOCKER_REPOSITORY}/debian-${{ matrix.version.os }}:clang${{ matrix.version.clang }}" >> $GITHUB_ENV
- name: Build the Docker image
working-directory: docker/debian
run: |
docker build . \
--target clang \
--build-arg GITHUB_REPO=${GITHUB_REPOSITORY} \
--build-arg DEBIAN_VERSION=${{ matrix.version.os }} \
--build-arg CLANG_VERSION=${{ matrix.version.clang }} \
--build-arg CONAN_VERSION=${{ env.CONAN_VERSION }} \
--tag ${{ env.DOCKER_IMAGE }}
- name: Push the Docker image
run: docker push ${{ env.DOCKER_IMAGE }}