Skip to content

release 0.1.217

release 0.1.217 #763

Workflow file for this run

name: ci
on:
push: {branches-ignore: [latest], tags: ['*']}
pull_request:
env:
PACKAGE_NAME: ${{ github.event.repository.name }}
PACKAGE_VERSION: ${{ github.sha }}
MYCI_GIT_USERNAME: igagis
MYCI_GIT_PASSWORD: ${{ secrets.MYCI_GIT_ACCESS_TOKEN }}
MYCI_CONAN_REMOTE: https://gagis.hopto.org/conan
MYCI_CONAN_USER: cppfw
MYCI_CONAN_PASSWORD: ${{ secrets.MYCI_CONAN_PASSWORD }}
jobs:
##### deb #####
deb:
strategy:
fail-fast: false
matrix:
include:
# - {os: debian, codename: buster, image_owner: }
# - {os: debian, codename: buster, image_owner: i386/, labels: [i386,docker]}
# - {os: debian, codename: buster, image_owner: , labels: [ubuntu-24.04-arm]}
- {os: debian, codename: bullseye, image_owner: }
- {os: debian, codename: bullseye, image_owner: arm32v7/, labels: [ubuntu-24.04-arm]}
- {os: debian, codename: bullseye, image_owner: arm64v8/, labels: [ubuntu-24.04-arm]}
- {os: debian, codename: bookworm, image_owner: }
- {os: debian, codename: bookworm, image_owner: arm32v7/, labels: [ubuntu-24.04-arm]}
- {os: debian, codename: bookworm, image_owner: arm64v8/, labels: [ubuntu-24.04-arm]}
# - {os: debian, codename: bookworm, image_owner: , labels: [riscv64,docker]}
- {os: debian, codename: trixie, image_owner: }
- {os: debian, codename: trixie, image_owner: arm32v7/, labels: [ubuntu-24.04-arm]}
- {os: debian, codename: trixie, image_owner: arm64v8/, labels: [ubuntu-24.04-arm]}
# - {os: debian, codename: trixie, image_owner: , labels: [riscv64,docker]}
- {os: ubuntu, codename: bionic, image_owner: }
- {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: [ubuntu-24.04-arm]}
# - {os: raspbian, codename: bookworm, image_owner: igagis/, labels: [ubuntu-24.04-arm]}
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 }}
steps:
- name: install ci tools
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
apt --quiet update --assume-yes
apt --quiet install --assume-yes devscripts equivs git nodejs
- name: git clone
uses: myci-actions/checkout@main
- name: install myci
run: make install
- name: set PACKAGE_VERSION
uses: myci-actions/export-env-var@main
with: {name: PACKAGE_VERSION, value: $(myci-deb-version.sh)}
- name: prepare debian package
run: myci-deb-prepare.sh
- name: install deps
run: myci-deb-install-build-deps.sh
- name: build
run: |
cd build
dpkg-buildpackage --unsigned-source --unsigned-changes
- 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 cppfw/${{ matrix.os }} --distro ${{ matrix.codename }} --component main ${PACKAGE_NAME}*_${PACKAGE_VERSION}_*.deb
if: startsWith(github.ref, 'refs/tags/')
##### archlinux #####
# archlinux:
# strategy:
# fail-fast: false
# matrix:
# include:
# - {image: "archlinux:latest", arch: amd64}
# # - {image: "lopsided/archlinux-arm32v7:latest", arch: arm32, labels: [arm,docker]}
# - {image: "lopsided/archlinux-arm64v8:latest", arch: arm64, labels: [ubuntu-24.04-arm]}
# runs-on: ${{ (matrix.labels == '' && 'ubuntu-latest') || matrix.labels }}
# container: ${{ matrix.image }}
# name: linux - archlinux | ${{ matrix.arch }}
# steps:
# - name: install ci tools
# run: |
# pacman --sync --refresh --sysupgrade --noconfirm --noprogressbar base-devel git
# - name: git clone
# uses: myci-actions/checkout@main
# - name: install myci
# run: make install
# - name: set PACKAGE_VERSION
# uses: myci-actions/export-env-var@main
# with: {name: PACKAGE_VERSION, value: $(myci-deb-version.sh)}
# # makepkg needs to install dependency packages, so nobody user needs sudo rights
# - name: add nobody to sudoers
# run: |
# echo "nobody ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
# - name: build
# run: |
# # provide write access to user nobody
# chmod --recursive 777 .
# cd build/archlinux
# sudo --user=nobody --preserve-env=PACKAGE_VERSION makepkg --syncdeps --noconfirm --skipinteg --noprogressbar
# - name: deploy
# run: |
# echo "${{ secrets.MYCI_REPO_SSH_KEY }}" > repo_key_rsa && chmod 600 repo_key_rsa
# myci-deploy-pacman-ssh.sh --server gagis.hopto.org --key repo_key_rsa --repo cppfw/archlinux/${{ matrix.arch }} --database cppfw build/archlinux/$PACKAGE_NAME-*-any.pkg.*
# if: startsWith(github.ref, 'refs/tags/')
##### macosx #####
macosx:
runs-on: macos-latest
steps:
- name: git clone
uses: myci-actions/checkout@main
- name: install myci
run: sudo make install
- name: install deps
run: myci-brew-install.sh `myci-list-deps-homebrew.sh`
- name: build
run: make --include-dir=$(brew --prefix)/include
- name: test
run: make --include-dir=$(brew --prefix)/include test
- name: deploy
run: myci-deploy-homebrew.sh --tap cppfw/tap
if: startsWith(github.ref, 'refs/tags/')
##### msys2 #####
msys2:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- name: make msys2 to provide the default shell
uses: msys2/setup-msys2@v2
with:
update: true
msystem: MSYS
install: >-
msys2-devel
make
- name: git clone
uses: myci-actions/checkout@main
- name: install myci
run: make install
- name: prepare pacman package
run: myci-apply-version.sh build/msys2/PKGBUILD.in
- name: build
run: |
cd build/msys2
makepkg --syncdeps --noconfirm --skipinteg
- name: deploy
run: |
echo "${{ secrets.MYCI_REPO_SSH_KEY }}" > repo_key_rsa && chmod 600 repo_key_rsa
myci-deploy-pacman-ssh.sh --server gagis.hopto.org --key repo_key_rsa --repo cppfw/msys2/msys --database cppfw_msys build/msys2/$PACKAGE_NAME-*-any.pkg.*
if: startsWith(github.ref, 'refs/tags/')
##### mingw #####
msys2-mingw:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
strategy:
fail-fast: false
matrix:
include:
- {arch: i686, repo: mingw32}
- {arch: x86_64, repo: mingw64}
name: msys2 | ${{ matrix.repo }}
steps:
- name: make msys2 to provide the default shell
uses: msys2/setup-msys2@v2
with:
update: true
msystem: ${{ matrix.repo }}
install: >-
msys2-devel
make
diffutils
- name: add cppfw pacman msys repo
uses: myci-actions/add-pacman-repo@main
with:
name: cppfw_msys
url: http://gagis.hopto.org/repo/cppfw/msys2/msys
shell: 'msys2 {0}'
key-server: http://gagis.hopto.org/repo/cppfw/pubkey.gpg
- name: git clone
uses: myci-actions/checkout@main
- name: install myci
run: make install
- name: prepare pacman package
run: myci-apply-version.sh build/msys2/PKGBUILD.in
- name: build
# to make makepkg-mingw build only one architecture we need to set the MINGW_ARCH
env: {MINGW_ARCH: '${{ matrix.repo }}'}
run: |
cd build/msys2
PKGEXT='.pkg.tar.xz' makepkg-mingw --syncdeps --noconfirm --skipinteg
##### vcpkg #####
vcpkg:
strategy:
fail-fast: false
matrix:
include:
- {os: debian, codename: bookworm, image_owner: }
# - {os: debian, codename: bookworm, image_owner: i386/, labels: [i386,docker]}
# - {os: debian, codename: bookworm, image_owner: arm32v7/, labels: [ubuntu-24.04-arm]}
# - {os: debian, codename: bookworm, image_owner: arm64v8/, labels: [ubuntu-24.04-arm]}
runs-on: ${{ (matrix.labels == '' && 'ubuntu-latest') || matrix.labels }}
container: ${{ matrix.image_owner }}${{ matrix.os }}:${{ matrix.codename }}
name: vcpkg - linux | ${{ matrix.image_owner }}
steps:
- name: install ci tools
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
apt --quiet update --assume-yes
apt --quiet install --assume-yes cmake git curl zip unzip tar nodejs pkg-config jq g++
- name: git clone
uses: myci-actions/checkout@main
- name: install myci
run: make install
- name: install vcpkg
run: |
git clone https://github.com/microsoft/vcpkg.git vcpkg-installation
(cd vcpkg-installation; ./bootstrap-vcpkg.sh)
- name: set VCPKG_ROOT
uses: myci-actions/export-env-var@main
with: {name: VCPKG_ROOT, value: "$(pwd)/vcpkg-installation"}
- name: add VCPKG_ROOT to PATH
uses: myci-actions/export-env-var@main
with: {name: PATH, value: "$PATH:$VCPKG_ROOT"}
- name: prepare vcpkg port
run: |
myci-vcpkg-prepare.sh --vcpkg-dir build/vcpkg --git-ref ${{ github.sha }}
- name: test vcpkg port
run: |
cd build/vcpkg/test
cmake .
- name: upload vcpkg logs to artifacts
if: always() # even if previous steps fail, this one needs to be run
uses: actions/upload-artifact@v4
with:
name: vcpkg_logs
path: |
vcpkg-installation/buildtrees/${{ env.PACKAGE_NAME }}/
build/vcpkg/**/*.log
- name: deploy vcpkg port
run: |
myci-deploy-vcpkg.sh --repo cppfw/vcpkg-repo --port-dir build/vcpkg/overlay/${PACKAGE_NAME}
if: startsWith(github.ref, 'refs/tags/')
##### conan - linux #####
conan-linux:
strategy:
fail-fast: false
matrix:
include:
- {os: debian, codename: bookworm, image_owner: }
# - {os: debian, codename: bookworm, image_owner: i386/, labels: [i386,docker]}
# - {os: debian, codename: bookworm, image_owner: arm32v7/, labels: [ubuntu-24.04-arm]}
# - {os: debian, codename: bookworm, image_owner: arm64v8/, labels: [ubuntu-24.04-arm]}
runs-on: ${{ (matrix.labels == '' && 'ubuntu-latest') || matrix.labels }}
container: ${{ matrix.image_owner }}${{ matrix.os }}:${{ matrix.codename }}
name: conan - linux | ${{ matrix.image_owner }}
steps:
- name: add cppfw deb repo
uses: myci-actions/add-deb-repo@main
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: devscripts equivs pipx git
- name: add ~/.local/bin to PATH
uses: myci-actions/export-env-var@main
with: {name: PATH, value: "$PATH:$HOME/.local/bin"}
- name: install conan
run: pipx install conan
- name: create default conan profile
run: |
conan profile detect --name default
sed -i -E "s/compiler.cppstd=.*$/compiler.cppstd=17/g" ~/.conan2/profiles/default
- name: git clone
uses: myci-actions/checkout@main
- name: install myci
run: make install
- name: set PACKAGE_VERSION
uses: myci-actions/export-env-var@main
with: {name: PACKAGE_VERSION, value: $(myci-deb-version.sh)}
if: startsWith(github.ref, 'refs/tags/')
- name: build
run: |
conan remote add cppfw $MYCI_CONAN_REMOTE
conan create build/conan --build-require --build=missing --user $MYCI_CONAN_USER --channel main --version $PACKAGE_VERSION
- name: deploy conan package
run: |
conan remote login --password $MYCI_CONAN_PASSWORD cppfw $MYCI_CONAN_USER
conan upload --check --remote cppfw $PACKAGE_NAME/$PACKAGE_VERSION@$MYCI_CONAN_USER/main
if: startsWith(github.ref, 'refs/tags/')