Build CI images / build (linux-native) (push) Successful in 18s
Build CI images / build (nixos) (push) Successful in 8s
Build CI images / build (vulkan) (push) Successful in 24s
Build CI images / build (windows-clang) (push) Successful in 2m31s
Build CI images / build (windows-gcc) (push) Successful in 30s
vulkan gains msitools (wixl), rpm-tools, dpkg and meson so installer jobs can produce real MSIs and validate RPM/DEB output, and so the Meson foreign-provider tests run instead of being skipped. windows-gcc and windows-clang gain msitools for Windows-target MSIs. The build workflow now verifies the new tools inside the built images.
101 lines
3.3 KiB
YAML
101 lines
3.3 KiB
YAML
# Builds every image in images/ and pushes it to the Gitea container registry
|
|
# as git.faumaray.com/void/ci-images:<image>. Pull requests build without
|
|
# pushing; a push to main publishes the tags the runner labels use.
|
|
name: Build CI images
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- "images/**"
|
|
- ".gitea/workflows/build.yml"
|
|
pull_request:
|
|
paths:
|
|
- "images/**"
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
# The Actions token is not accepted by the container registry, so the push
|
|
# uses a PAT. REGISTRY_USER / REGISTRY_TOKEN (a repository variable and
|
|
# secret) override the organization release-bot defaults.
|
|
env:
|
|
REGISTRY_USER: ${{ vars.REGISTRY_USER || 'echoion-release-bot' }}
|
|
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN || secrets.RELEASE_BOT_TOKEN }}
|
|
strategy:
|
|
fail-fast: false
|
|
# One push at a time: the registry returned HTTP 500 when two multi-GB
|
|
# images uploaded concurrently.
|
|
max-parallel: 1
|
|
matrix:
|
|
image:
|
|
- linux-native
|
|
- nixos
|
|
- vulkan
|
|
- windows-gcc
|
|
- windows-clang
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Resolve the registry and image name
|
|
id: image
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
server=${GITHUB_SERVER_URL#http://}
|
|
server=${server#https://}
|
|
server=${server%%/*}
|
|
repo=${GITHUB_REPOSITORY,,}
|
|
printf 'registry=%s\n' "$server" >>"$GITHUB_OUTPUT"
|
|
printf 'ref=%s/%s:%s\n' "$server" "$repo" "${{ matrix.image }}" >>"$GITHUB_OUTPUT"
|
|
|
|
- name: Log in to the Gitea container registry
|
|
if: github.event_name != 'pull_request' && env.REGISTRY_TOKEN != ''
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
printf '%s' "$REGISTRY_TOKEN" |
|
|
docker login "${{ steps.image.outputs.registry }}" \
|
|
-u "$REGISTRY_USER" --password-stdin
|
|
|
|
- name: Build
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
docker build --pull \
|
|
--tag "${{ steps.image.outputs.ref }}" \
|
|
"images/${{ matrix.image }}"
|
|
|
|
- name: Smoke test Vulkan (software driver)
|
|
if: matrix.image == 'vulkan'
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
docker run --rm "${{ steps.image.outputs.ref }}" bash -lc '
|
|
icd=$(ls /usr/share/vulkan/icd.d/lvp_icd*.json | head -n1)
|
|
xvfb-run -a env VK_DRIVER_FILES="$icd" vulkaninfo --summary'
|
|
|
|
- name: Verify packaging tools
|
|
if: matrix.image == 'vulkan' || matrix.image == 'windows-gcc' || matrix.image == 'windows-clang'
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
docker run --rm "${{ steps.image.outputs.ref }}" bash -lc '
|
|
wixl --version
|
|
command -v msiinfo
|
|
if [ -x /usr/bin/rpm ]; then rpm --version; fi
|
|
if command -v dpkg-deb >/dev/null 2>&1; then dpkg-deb --version | head -n1; fi
|
|
if command -v meson >/dev/null 2>&1; then meson --version; fi'
|
|
|
|
- name: Push
|
|
if: github.event_name != 'pull_request' && env.REGISTRY_TOKEN != ''
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
docker push "${{ steps.image.outputs.ref }}"
|