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
|
# Runs the sanity testsuite
name: CI
on:
push:
# run on all branches (also on feature branches of forks, before creating a PR)
branches:
- '**'
# don't run workflow on tags
tags-ignore:
- '**'
workflow_dispatch:
jobs:
qa:
name: ${{ matrix.platform }}
runs-on: ${{ matrix.os }}
# do not mark the workflow as failed if an experimental distro (e.g. rawhide) fails
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
include:
# default platforms for CI in the performancecopilot/pcp repo
- {platform: ubuntu1804-i386-container, os: ubuntu-latest, experimental: false}
- {platform: ubuntu2004-container, os: ubuntu-latest, experimental: false}
- {platform: ubuntu2204-container, os: ubuntu-latest, experimental: false}
- {platform: ubuntu2404-container, os: ubuntu-latest, experimental: false}
- {platform: fedora42-container, os: ubuntu-22.04, experimental: false}
- {platform: fedora43-container, os: ubuntu-22.04, experimental: false}
- {platform: amazonlinux2023-container, os: ubuntu-22.04, experimental: true}
- {platform: amazonlinux2023-aarch64-container, os: ubuntu-22.04-arm, experimental: true}
- {platform: centos-stream8-container, os: ubuntu-latest, experimental: false}
- {platform: centos-stream9-container, os: ubuntu-22.04, experimental: false}
- {platform: centos-stream10-container, os: ubuntu-22.04, experimental: false}
# other platforms that may be used for testing in developer repos
# - {platform: debian12-container, os: ubuntu-latest, experimental: false}
# - {platform: debian13-container, os: ubuntu-latest, experimental: false}
# - {platform: ubuntu1804-container, os: ubuntu-latest, experimental: false}
# - {platform: ubuntu2004, os: ubuntu-latest, experimental: false}
# - {platform: ubuntu2204, os: ubuntu-latest, experimental: false}
# - {platform: fedora-rawhide-container, os: ubuntu-22.04, experimental: true }
steps:
- name: Checkout sources
uses: actions/checkout@v6
- name: Fix local hostname DNS lookup
run: echo 127.0.1.1 $(hostname --fqdn) $(hostname) | sudo tee -a /etc/hosts
- name: Update version information
run: |
. VERSION.pcp
PACKAGE_BUILD="0.$(date +'%Y%m%d').$(git rev-parse --short HEAD)"
PCP_VERSION=${PACKAGE_MAJOR}.${PACKAGE_MINOR}.${PACKAGE_REVISION}
PCP_BUILD_VERSION=${PCP_VERSION}-${PACKAGE_BUILD}
sed -i "s/PACKAGE_BUILD=.*/PACKAGE_BUILD=${PACKAGE_BUILD}/" VERSION.pcp
sed -i "1 s/(.*)/(${PCP_BUILD_VERSION})/" debian/changelog
- name: Setup
run: |
python3 -c 'import yaml' || pip3 install pyyaml
mkdir -p artifacts/build artifacts/test
touch artifacts/build/.keep
# crun >= 1.9.1 is required on Ubuntu 20.04.6
# this workaround came from ...
# https://github.com/kubernetes-sigs/kind/pull/3527
ARCH=$(arch | sed -e 's/x86_64/amd64/g' -e 's/aarch64/arm64/g')
curl -sLo /tmp/crun https://github.com/containers/crun/releases/download/1.14.3/crun-1.14.3-linux-$ARCH
chmod +x /tmp/crun
sudo cp /tmp/crun /usr/bin/crun
build/ci/ci-run.py ${{ matrix.platform }} setup
- name: Build
run: build/ci/ci-run.py ${{ matrix.platform }} task build
- name: Copy build artifacts
run: build/ci/ci-run.py ${{ matrix.platform }} artifacts build --path artifacts/build
- name: Upload build artifacts
# always() is required here to run this step even if the build fails
# otherwise the platform will be skipped in the test report (it should be flagged as broken)
if: always()
uses: actions/upload-artifact@v6
with:
name: build-${{ matrix.platform }}
path: artifacts/build
- name: Install
run: build/ci/ci-run.py ${{ matrix.platform }} task install
- name: Initialize QA
id: init_qa
run: build/ci/ci-run.py ${{ matrix.platform }} task init_qa
- name: QA (sanity group)
run: build/ci/ci-run.py ${{ matrix.platform }} task qa_sanity
- name: Copy test results
# always() is required here to run this step even if the QA step fails or times out
if: always() && steps.init_qa.outcome == 'success'
run: build/ci/ci-run.py ${{ matrix.platform }} artifacts test --path artifacts/test
- name: Upload test results
if: always() && steps.init_qa.outcome == 'success'
uses: actions/upload-artifact@v6
with:
name: test-${{ matrix.platform }}
path: artifacts/test
# build-macos-latest-clang:
# runs-on: macOS-latest
# env:
# CC: clang
# steps:
# - uses: actions/checkout@v6
# - name: Install Dependencies
# run: brew install automake pkg-config openssl libuv
# - name: Build packages
# run: ./Makepkgs --verbose
|