Patches from Erez's branch #1231
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-License-Identifier: GPL-3.0-or-later | |
# SPDX-FileCopyrightText: Copyright © 2023 Erez Geva <[email protected]> | |
# | |
# @author Erez Geva <ErezGeva2@@gmail.com> | |
# @copyright © 2023 Erez Geva | |
# | |
# GitHub Continuous Integration script | |
# - Main Continuous Integration | |
# - Build cross packages on Debian | |
# - Build packages install them in system and | |
# test with linuxptp and clock simulated network | |
# to verify proper installation | |
# - compare ABI | |
############################################################################### | |
name: continuous integration | |
permissions: read-all | |
# On evry push and Pull Request (PR) | |
on: [push, pull_request, workflow_dispatch] | |
env: | |
USER: builder | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
names: [deb.trixie, deb.bookworm, rpmbuild, pacmanbuild, portage] | |
fail-fast: false | |
container: | |
image: ghcr.io/erezgeva/${{ matrix.names }}:latest | |
env: | |
GITHUB_CONTAINER: ${{ matrix.names }} | |
steps: | |
- name: checkout repository | |
uses: actions/checkout@v4 | |
- name: continuous integration | |
run: | | |
case "$GITHUB_CONTAINER" in | |
deb.*) | |
# Debian place the debian packages in the parent folder | |
chown -R $USER:$USER .. | |
;; | |
*) | |
chown -R $USER:$USER . | |
;; | |
esac | |
su $USER -c tools/ci.sh | |
cross: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
names: [deb.trixie, deb.bookworm] | |
fail-fast: false | |
container: | |
image: ghcr.io/erezgeva/${{ matrix.names }}:latest | |
steps: | |
- name: checkout repository | |
uses: actions/checkout@v4 | |
- name: cross build | |
run: | | |
chown -R $USER:$USER .. | |
su $USER -c tools/ci_cross.sh | |
pkgs: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
names: [deb.trixie, deb.bookworm, rpmbuild, pacmanbuild, portage] | |
fail-fast: false | |
container: | |
image: ghcr.io/erezgeva/${{ matrix.names }}:latest | |
env: | |
GITHUB_CONTAINER: ${{ matrix.names }} | |
steps: | |
- name: checkout linuxptp repository | |
uses: actions/checkout@v4 | |
with: | |
repository: nwtime/linuxptp | |
path: linuxptp | |
- name: checkout repository | |
uses: actions/checkout@v4 | |
with: | |
path: libptpmgmt | |
- name: build packages and install them | |
run: | | |
chown -R $USER:$USER . | |
su $USER -c libptpmgmt/tools/ci_build.sh | |
- name: build linuxptp | |
run: su $USER -c "make -C linuxptp" | |
- name: test with linuxptp | |
run: libptpmgmt/tools/ci_pkgs.sh | |
- name: test with linuxptp without the development package | |
if: ${{ matrix.names != 'portage' }} | |
run: libptpmgmt/tools/ci_pkgs_no_dev.sh | |
abi: | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/erezgeva/deb.trixie:latest | |
steps: | |
- name: checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
fetch-tags: true | |
- name: compare ABI | |
run: | | |
chown -R $USER:$USER . | |
su $USER -c tools/ci_abi.sh | |
- name: save ABI compare report | |
uses: actions/upload-artifact@v4 | |
with: | |
name: abi_report | |
retention-days: 90 | |
path: compat_reports/ | |
- name: Report ABI error | |
run: su $USER -c tools/ci_abi_err.sh |