Skip to content

unit-test-refresh

unit-test-refresh #57

name: unit-test-refresh
on:
schedule:
# auto-refresh every Sunday evening
- cron: '0 22 * * 0'
# can be run manually on https://github.com/cockpit-project/cockpit/actions
workflow_dispatch:
jobs:
# we do both builds and all tests in a single run, so that we only upload the containers on success
refresh:
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
timeout-minutes: 60
steps:
- name: Clone repository
uses: actions/checkout@v3
with:
# need this to also fetch tags
fetch-depth: 0
- name: Build fresh containers
timeout-minutes: 10
run: containers/unit-tests/build
- name: Run amd64 gcc check-memory test
timeout-minutes: 20
run: containers/unit-tests/start --verbose --env=CC=gcc --image-tag=latest --make check-memory
- name: Run i386 clang check-memory test
timeout-minutes: 20
# HACK: https://bugs.kde.org/show_bug.cgi?id=452758
run: containers/unit-tests/start --verbose --env=CC=clang --env=CFLAGS='-O2 -gdwarf-4' --image-tag=i386 --make check-memory
- name: Run amd64 clang distcheck test
timeout-minutes: 15
run: containers/unit-tests/start --verbose --env=CC=clang --image-tag=latest --make distcheck
- name: Run i386 gcc distcheck test
timeout-minutes: 15
run: containers/unit-tests/start --verbose --env=CC=clang --image-tag=i386 --make distcheck
- name: Log into container registry
run: podman login -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} ghcr.io
- name: Push containers to registry
run: |
podman push ghcr.io/cockpit-project/unit-tests:latest
podman push ghcr.io/cockpit-project/unit-tests:i386