Skip to content

wip

wip #95

Workflow file for this run

name: CI build
on:
pull_request:
push:
branches: [main]
# Checks if any concurrent jobs under the same pull request or branch are being executed
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build-and-test:
name: build-and-test-${{ matrix.arch }}
# ubuntu24.04 for podman >= 4.x
runs-on: ${{ (matrix.arch == 'arm64' && 'ubuntu-24.04-arm') || 'ubuntu-24.04' }}
strategy:
fail-fast: false
matrix:
arch: [ amd64, arm64 ]
steps:
# Needed by vcpkg caching
- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'recursive'
# Needed by containerd go package - build time dep, no runtime.
- name: Install plugin deps
run: sudo apt-get install -y --no-install-recommends libbtrfs-dev
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go-worker/go.mod
cache-dependency-path: go-worker/go.sum
- name: Build plugin library
run: make libcontainer.so
env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
# Needed by podman package - build and runtime dep.
# For the go-worker library, it is only a runtime dep,
# and is provided by plugin vcpkg configuration.
- name: Install go-worker executable deps
run: sudo apt-get install -y --no-install-recommends libgpgme-dev
- name: Build go-worker executable
run: make -C go-worker exe
# Podman is not shipped by beta github arm64 runners:
# https://github.com/actions/partner-runner-images/blob/main/images/arm-ubuntu-22-image.md#not-installed-software
# Building tests fail with: "faccessat /home/runneradmin/.config/containers/storage.conf: permission denied"
- name: Run tests (x64 only)
if: matrix.arch == 'amd64'
run: |
systemctl --user start podman
make test