add TODO:s #164
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
name: ci | |
on: | |
push: {branches-ignore: [latest], tags: ['*']} | |
pull_request: | |
env: | |
PACKAGE_NAME: ${{ github.event.repository.name }} | |
PACKAGE_VERSION: ${{ github.sha }} | |
jobs: | |
##### coverage ##### | |
coverage: | |
runs-on: ubuntu-latest | |
container: debian:bookworm | |
name: coverage - measure | |
env: | |
linux_distro: debian | |
linux_release: bookworm | |
steps: | |
- name: add cppfw deb repo | |
uses: myci-actions/add-deb-repo@master | |
with: | |
repo: deb https://gagis.hopto.org/repo/cppfw/${{ env.linux_distro }} ${{ env.linux_release }} main | |
repo-name: cppfw | |
keys-asc: https://gagis.hopto.org/repo/cppfw/pubkey.gpg | |
install: myci locales git pipx | |
- name: add llvm repo (for clang-format) | |
uses: myci-actions/add-deb-repo@master | |
with: | |
repo: deb https://apt.llvm.org/${{ env.linux_release }} llvm-toolchain-${{ env.linux_release }} main | |
repo-name: llvm | |
keys-asc: https://apt.llvm.org/llvm-snapshot.gpg.key | |
- name: git clone | |
uses: myci-actions/checkout@master | |
# - name: prepare debian package | |
# run: myci-deb-prepare.sh | |
- name: install deps | |
run: myci-deb-install-build-deps.sh | |
- name: build | |
run: make config=gcov | |
- name: test | |
run: make config=gcov test | |
- name: generate coverage report | |
run: pipx run gcovr --exclude-throw-branches --filter src/ --cobertura > cobertura.xml | |
- name: upload coverage report to artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: cobertura.xml | |
path: cobertura.xml | |
- name: upload coverage data to codecov.io | |
uses: codecov/codecov-action@v4 | |
if: always() # even if previous steps fail, this one needs to be run | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
# do not search for coverage files automatically, upload only specified files | |
disable_search: true | |
files: cobertura.xml | |
# flags: unittests # optional | |
name: codecov-umbrella # optional | |
fail_ci_if_error: true # optional (default = false) | |
verbose: true # optional (default = false) | |
##### sanitizer ##### | |
sanitizer: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- {os: debian, codename: bookworm, image_owner: } | |
- {os: debian, codename: bookworm, image_owner: , labels: [arm32,docker]} | |
- {os: debian, codename: bookworm, image_owner: , labels: [arm64,docker]} | |
runs-on: ${{ (matrix.labels == '' && 'ubuntu-latest') || matrix.labels }} | |
container: ${{ matrix.image_owner }}${{ matrix.os }}:${{ matrix.codename }} | |
name: sanitizer - ${{ matrix.image_owner }}${{ matrix.os }}:${{ matrix.codename }} | ${{ matrix.labels[0] }} | |
steps: | |
- name: add cppfw deb repo | |
uses: myci-actions/add-deb-repo@master | |
with: | |
repo: deb https://gagis.hopto.org/repo/cppfw/${{ matrix.os }} ${{ matrix.codename }} main | |
repo-name: cppfw | |
keys-asc: https://gagis.hopto.org/repo/cppfw/pubkey.gpg | |
install: myci locales git | |
- name: add llvm repo (for clang-format) | |
uses: myci-actions/add-deb-repo@master | |
with: | |
repo: deb https://apt.llvm.org/${{ matrix.codename }} llvm-toolchain-${{ matrix.codename }} main | |
repo-name: llvm | |
keys-asc: https://apt.llvm.org/llvm-snapshot.gpg.key | |
- name: install ci tools | |
run: | | |
apt --quiet install --assume-yes devscripts equivs | |
- name: git clone | |
uses: myci-actions/checkout@master | |
# - name: prepare debian package | |
# run: myci-deb-prepare.sh | |
- name: install deps | |
run: myci-deb-install-build-deps.sh | |
- name: build | |
run: make config=asan ${{ ((matrix.labels[0] == 'arm32' || matrix.labels[0] == 'arm64') && 'lint=off') || '' }} | |
- name: test | |
run: make config=asan test | |
##### deb linux ##### | |
deb: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# - {os: debian, codename: bullseye, image_owner: } | |
# - {os: debian, codename: bullseye, image_owner: i386/, labels: [i386,docker]} | |
# - {os: debian, codename: bullseye, image_owner: , labels: [arm32,docker]} | |
# - {os: debian, codename: bullseye, image_owner: , labels: [arm64,docker]} | |
- {os: debian, codename: bookworm, image_owner: } | |
# - {os: debian, codename: bookworm, image_owner: , labels: [i386,docker]} | |
- {os: debian, codename: bookworm, image_owner: , labels: [arm32,docker]} | |
- {os: debian, codename: bookworm, image_owner: , labels: [arm64,docker]} | |
# - {os: ubuntu, codename: focal, image_owner: } | |
- {os: ubuntu, codename: jammy, image_owner: } | |
- {os: ubuntu, codename: noble, image_owner: } | |
# - {os: raspbian, codename: bullseye, image_owner: igagis/, labels: [arm32,docker]} | |
- {os: raspbian, codename: bookworm, image_owner: igagis/, labels: [arm32,docker]} | |
runs-on: ${{ (matrix.labels == '' && 'ubuntu-latest') || matrix.labels }} | |
container: ${{ matrix.image_owner }}${{ matrix.os }}:${{ matrix.codename }} | |
name: linux - ${{ matrix.image_owner }}${{ matrix.os }}:${{ matrix.codename }} | ${{ matrix.labels[0] }} | |
steps: | |
- name: set TZ for ubuntu:focal | |
run: | | |
# configure timezone to avoid 'tzdata' package to require user interaction during installation (needed for ubuntu:focal) | |
TZ=Europe/Helsinki ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | |
- name: add cppfw deb repo | |
uses: myci-actions/add-deb-repo@master | |
with: | |
repo: deb https://gagis.hopto.org/repo/cppfw/${{ matrix.os }} ${{ matrix.codename }} main | |
repo-name: cppfw | |
keys-asc: https://gagis.hopto.org/repo/cppfw/pubkey.gpg | |
install: myci locales git devscripts equivs nodejs | |
- name: add llvm repo (for clang-format) | |
uses: myci-actions/add-deb-repo@master | |
with: | |
repo: deb https://apt.llvm.org/${{ matrix.codename }} llvm-toolchain-${{ matrix.codename }} main | |
repo-name: llvm | |
keys-asc: https://apt.llvm.org/llvm-snapshot.gpg.key | |
- name: git clone | |
uses: myci-actions/checkout@master | |
- name: set PACKAGE_VERSION | |
uses: myci-actions/export-env-var@master | |
with: {name: PACKAGE_VERSION, value: $(myci-deb-version.sh debian/changelog)} | |
# - name: prepare debian package | |
# run: myci-deb-prepare.sh | |
- name: install deps | |
run: myci-deb-install-build-deps.sh | |
- name: build | |
run: | | |
dpkg-buildpackage --unsigned-source --unsigned-changes | |
mv ../*.*deb . | |
- name: upload deb packages to artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.os }}_${{ matrix.codename }}_${{ matrix.labels[0] }}_debs | |
path: "*.*deb" | |
- name: deploy deb packages | |
run: | | |
echo "${{ secrets.MYCI_REPO_SSH_KEY }}" > repo_key_rsa && chmod 600 repo_key_rsa | |
myci-deploy-apt-ssh.sh --key repo_key_rsa --server gagis.hopto.org --repo gagistech/${{ matrix.os }} --distro ${{ matrix.codename }} --component main *_${PACKAGE_VERSION}_*.deb | |
if: startsWith(github.ref, 'refs/tags/') |