WIP: Trying to get MacOS packaging fixed #5930
Workflow file for this run
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: Build | |
on: | |
merge_group: | |
push: | |
paths-ignore: | |
- 'docs/**' | |
- '.github/ISSUE_TEMPLATE/**' | |
- '.github/*.yml' | |
- 'LICENSE.txt' | |
- 'mkdocs.yml' | |
- '*.md' | |
- '*.sh' | |
branches: | |
- master | |
pull_request: | |
paths-ignore: | |
- 'docs/**' | |
- '.github/ISSUE_TEMPLATE/**' | |
- '.github/*.yml' | |
- 'LICENSE.txt' | |
- 'mkdocs.yml' | |
- '*.md' | |
- '*.sh' | |
branches: | |
- master | |
concurrency: | |
group: build-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
CTEST_OUTPUT_ON_FAILURE: 1 | |
jobs: | |
# {{{ Common checks | |
check_common: | |
name: "Check CI scripts" | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: "Checking for common errors in build, deployment, and CI." | |
run: ./scripts/check-common.sh | |
check_PR_TODOs: | |
name: "Check PR-TODOs" | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: "Checking for open PR-related TODO items" | |
run: ./scripts/check-pr-todos.sh | |
check_clang_format: | |
name: "Check C++ style" | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run clang-format style check for C/C++/Protobuf programs. | |
uses: jidicula/[email protected] | |
with: | |
clang-format-version: '15' | |
check-path: 'src' | |
#exclude-regex: 'sse2neon.h' | |
- name: "Check includes" | |
run: ./scripts/check-includes.sh | |
editorconfig: | |
name: "Check editorconfig" | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: editorconfig-checker/action-editorconfig-checker@main | |
- run: editorconfig-checker | |
# }}} | |
# {{{ ArchLinux | |
archlinux: | |
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v') | |
strategy: | |
matrix: | |
arch: | |
[ | |
"linux/amd64 x86_64" | |
] | |
name: "Archlinux ${{ matrix.arch }}" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: all | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v2 | |
with: | |
version: latest | |
- name: Read info | |
id: tags | |
shell: bash | |
run: | | |
arch="${{ matrix.arch }}" | |
echo "PLATFORM=${arch%% *}" >> "$GITHUB_OUTPUT" | |
echo "ARCH=${arch##* }" >> "$GITHUB_OUTPUT" | |
- name: Installing xmllint for ci-set-vars | |
run: sudo apt -qy install libxml2-utils | |
- name: set environment variables | |
id: set_vars | |
run: ./scripts/ci-set-vars.sh | |
env: | |
REPOSITORY: ${{ github.event.repository.name }} | |
- name: Build ${{ matrix.arch }} release | |
shell: bash | |
run: | | |
docker buildx build --platform ${{ steps.tags.outputs.PLATFORM }} \ | |
--tag contour:${{ steps.tags.outputs.ARCH }} \ | |
-f .github/archlinux/Dockerfile \ | |
--load \ | |
. | |
docker create --name contour-${{ steps.tags.outputs.ARCH }} contour:${{ steps.tags.outputs.ARCH }} | |
docker cp contour-${{ steps.tags.outputs.ARCH }}:/app/contour.pkg.tar.zst contour-${{ steps.tags.outputs.ARCH }}.pkg.tar.zst | |
docker container rm contour-${{ steps.tags.outputs.ARCH }} | |
- name: "Uploading Archlinux .pkg.tar.zst package" | |
uses: actions/upload-artifact@v3 | |
with: | |
name: "contour-${{ steps.tags.outputs.ARCH }}.pkg.tar.zst" | |
path: "contour-${{ steps.tags.outputs.ARCH }}.pkg.tar.zst" | |
if-no-files-found: error | |
retention-days: 7 | |
# }}} | |
# {{{ Fedora | |
fedora: | |
strategy: | |
fail-fast: false | |
matrix: | |
os_version: [39] | |
arch: | |
[ | |
"linux/amd64 x86_64" | |
] | |
name: "Fedora ${{ matrix.os_version }} ${{ matrix.arch }}" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v2 | |
with: | |
version: latest | |
- name: Read matrix info | |
id: tags | |
shell: bash | |
run: | | |
arch="${{ matrix.arch }}" | |
echo "PLATFORM=${arch%% *}" >> "$GITHUB_OUTPUT" | |
echo "ARCH=${arch##* }" >> "$GITHUB_OUTPUT" | |
- name: Installing xmllint for ci-set-vars | |
run: sudo apt -qy install libxml2-utils | |
- name: set environment variables | |
id: set_vars | |
run: ./scripts/ci-set-vars.sh | |
env: | |
REPOSITORY: ${{ github.event.repository.name }} | |
- name: Fetch and unpack embeds | |
run: ./scripts/install-deps.sh | |
env: | |
PREPARE_ONLY_EMBEDS: 'ON' | |
SYSDEP_ASSUME_YES: 'ON' | |
OS_OVERRIDE: 'fedora' | |
- name: "Post-fix embedded dependency permissions." | |
run: sudo find _deps/sources -exec chown $UID {} \; | |
- name: prepare distfile | |
run: | | |
set -x | |
PKGNAME="contour-${{ steps.set_vars.outputs.VERSION }}" | |
DISTDIR="/tmp/dist/${PKGNAME}" | |
mkdir -p ${DISTDIR} | |
cp -rvp . ${DISTDIR} | |
tar czpf ${PKGNAME}.tar.gz -C "/tmp/dist" . | |
- name: disable pedantic compiler on certain OS versions | |
# Generally disable -Werror. | |
#if: ${{ matrix.os_version == 38 || matrix.os_version == 39 }} | |
run: | | |
set -ex | |
#sed -i -e "s/PEDANTIC_COMPILER=ON/PEDANTIC_COMPILER=OFF/" .github/fedora/contour.spec | |
sed -i -e "s/PEDANTIC_COMPILER_WERROR=ON/PEDANTIC_COMPILER_WERROR=OFF/" .github/fedora/contour.spec | |
- name: Build ${{ matrix.arch }} release | |
shell: bash | |
run: | | |
set -x | |
ARCH="${{ steps.tags.outputs.ARCH }}" | |
VERSION="${{ steps.set_vars.outputs.VERSION }}" | |
OS_VERSION="${{ matrix.os_version }}" | |
sed -i -e "s/fedora:35/fedora:${{ matrix.os_version }}/" .github/fedora/Dockerfile | |
docker buildx build --platform ${{ steps.tags.outputs.PLATFORM }} \ | |
--tag contour:${ARCH} \ | |
--build-arg VERSION=${VERSION} \ | |
--build-arg VERSION_STRING=${VERSION} \ | |
-f .github/fedora/Dockerfile \ | |
--load \ | |
. | |
docker create --name contour-${ARCH} contour:${ARCH} | |
docker cp contour-${ARCH}:/app/rpmbuild/RPMS/${ARCH}/contour-${VERSION}-1.fc${OS_VERSION}.${ARCH}.rpm \ | |
contour-${VERSION}-1.fc${OS_VERSION}.${ARCH}.rpm | |
docker cp contour-${ARCH}:/app/rpmbuild/RPMS/${ARCH}/contour-debuginfo-${VERSION}-1.fc${OS_VERSION}.${ARCH}.rpm \ | |
contour-debuginfo-${VERSION}-1.fc${OS_VERSION}.${ARCH}.rpm | |
docker cp contour-${ARCH}:/app/rpmbuild/RPMS/${ARCH}/contour-debugsource-${VERSION}-1.fc${OS_VERSION}.${ARCH}.rpm \ | |
contour-debugsource-${VERSION}-1.fc${OS_VERSION}.${ARCH}.rpm | |
docker container rm contour-${{ steps.tags.outputs.ARCH }} | |
echo "pwd: `pwd`" && ls -hla | |
- name: "Uploading Fedora RPM package" | |
uses: actions/upload-artifact@v3 | |
with: | |
name: "contour-${{ steps.set_vars.outputs.VERSION }}-1.fc${{ matrix.os_version }}.${{ steps.tags.outputs.ARCH }}.rpm" | |
path: | | |
contour-${{ steps.set_vars.outputs.VERSION }}-1.fc${{ matrix.os_version }}.${{ steps.tags.outputs.ARCH }}.rpm | |
contour-debuginfo-${{ steps.set_vars.outputs.VERSION }}-1.fc${{ matrix.os_version }}.${{ steps.tags.outputs.ARCH }}.rpm | |
contour-debugsource-${{ steps.set_vars.outputs.VERSION }}-1.fc${{ matrix.os_version }}.${{ steps.tags.outputs.ARCH }}.rpm | |
if-no-files-found: error | |
retention-days: 7 | |
# }}} | |
# {{{ FreeBSD | |
freebsd: | |
if: github.ref == 'refs/heads/master' | |
runs-on: macos-12 | |
name: FreeBSD 13 | |
# env: | |
# MYTOKEN: "value1" | |
# MYTOKEN2: "value2" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Test in FreeBSD | |
id: test | |
uses: vmactions/freebsd-vm@v0 | |
with: | |
envs: 'MYTOKEN MYTOKEN2' | |
usesh: true | |
copyback: false | |
prepare: pkg install -y wget | |
run: | | |
set -ex | |
pwd | |
ls -lah | |
whoami | |
env | |
freebsd-version | |
QTVER=6 SYSDEP_ASSUME_YES=ON ./scripts/install-deps.sh | |
mkdir build | |
cmake -DCMAKE_BUILD_TYPE=Debug -DLIBTERMINAL_BUILD_BENCH_HEADLESS=ON -DCONTOUR_QT_VERSION=6 -S . -B build | |
cmake --build build/ -j2 | |
./build/src/crispy/crispy_test | |
./build/src/vtparser/vtparser_test | |
./build/src/vtbackend/vtbackend_test | |
rm -rf _deps build | |
# }}} | |
# {{{ OS/X | |
osx: | |
name: "OS/X" | |
runs-on: macos-11 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: set variables | |
id: set_vars | |
run: | | |
./scripts/ci-set-vars.sh | |
echo QTVER=5 >> "$GITHUB_OUTPUT" | |
env: | |
REPOSITORY: ${{ github.event.repository.name }} | |
- name: ccache | |
uses: hendrikmuhs/[email protected] | |
with: | |
key: ccache-osx_qt${{ steps.set_vars.outputs.QTVER }} | |
max-size: 256M | |
- name: "Install dependencies" | |
run: | | |
set -ex | |
#brew update | |
QTVER=${{ steps.set_vars.outputs.QTVER }} | |
QTVER=${QTVER} ./scripts/install-deps.sh | |
brew install qt@${QTVER} openssl | |
- name: "Create build directory" | |
run: mkdir build | |
- name: "Generate build files" | |
run: | | |
QTVER=${{ steps.set_vars.outputs.QTVER }} | |
cmake . \ | |
-DCMAKE_BUILD_TYPE=RelWithDebInfo \ | |
-DQt${QTVER}_DIR="$(brew --prefix qt@${QTVER})/lib/cmake/Qt${QTVER}" \ | |
-DCONTOUR_QT_VERSION=${QTVER} \ | |
-B build/ | |
- name: "Build" | |
run: cmake --build build/ | |
- name: "test: crispy" | |
run: ./build/src/crispy/crispy_test | |
- name: "test: vtparser" | |
run: ./build/src/vtparser/vtparser_test | |
- name: "test: vtbackend" | |
run: ./build/src/vtbackend/vtbackend_test | |
- name: "Create Package(s)" | |
run: | | |
set -ex | |
cmake --build build --target package | |
# ls -hl build/ | |
# find build/src/contour/contour.app -print | |
BASENAME="contour-${{ steps.set_vars.outputs.version }}-osx" | |
mv -vf "build/Contour-${{ steps.set_vars.outputs.VERSION_STRING }}-Darwin.dmg" "${BASENAME}.dmg" | |
mv -vf "build/Contour-${{ steps.set_vars.outputs.VERSION_STRING }}-Darwin.zip" "${BASENAME}.zip" | |
- name: "Show ZIP-package contents" | |
run: "unzip -l contour-${{ steps.set_vars.outputs.version }}-osx.zip" | |
- name: upload to artifact store (DMG) | |
uses: actions/upload-artifact@v2 | |
with: | |
name: "contour-${{ steps.set_vars.outputs.version }}-osx.dmg" | |
path: "contour-${{ steps.set_vars.outputs.version }}-osx.dmg" | |
retention-days: 7 | |
# }}} | |
# {{{ Windows | |
windows: | |
name: "Windows" | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: setup environment | |
shell: powershell | |
id: set_vars | |
run: .\scripts\ci-set-vars.ps1 | |
env: | |
REPOSITORY: ${{ github.event.repository.name }} | |
- name: "Fetch embedded dependencies" | |
shell: powershell | |
run: | | |
./scripts/install-deps.ps1 --skip-vcpkg | |
type ./_deps/sources/CMakeLists.txt | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: "6.6.*" | |
#version: "5.15.*" | |
modules: qtmultimedia qt5compat qtshadertools | |
- name: "vcpkg: Install dependencies" | |
uses: lukka/[email protected] | |
id: runvcpkg | |
with: | |
vcpkgDirectory: ${{ runner.workspace }}/vcpkg/ | |
vcpkgGitCommitId: 3e93bb69a1cadeb36fe9eca3b6f3912d84f618d5 | |
- name: "create build directory" | |
shell: powershell | |
run: | | |
If (!(Test-Path build)) | |
{ | |
New-Item -ItemType Directory -Force -Path build | |
} | |
- name: "Generate build files" | |
run: cmake -DCMAKE_BUILD_TYPE=Release -DCONTOUR_QT_VERSION=6 -DLIBTERMINAL_BUILD_BENCH_HEADLESS=ON -DCMAKE_CXX_STANDARD=20 -DCMAKE_TOOLCHAIN_FILE="${{ runner.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows -DLIBTERMINAL_TESTING=ON -DLIBUNICODE_TESTING=ON -B build . | |
- name: "Build" | |
run: cmake --build build/ --config Release | |
- name: "test: crispy" | |
run: .\build\src\crispy\Release\crispy_test.exe | |
- name: "test: vtparser" | |
run: .\build\src\vtparser\Release\vtparser_test.exe | |
- name: "test: vtbackend" | |
run: .\build\src\vtbackend\Release\vtbackend_test.exe | |
- name: "Create Package(s)" | |
shell: powershell | |
run: | | |
cd build | |
cpack -V | |
type "_CPack_Packages/win64/WIX/wix.log" | |
- name: inspect | |
run: Get-ChildItem -Recurse | |
- name: "Rename package(s)" | |
run: | | |
mv "build\Contour-${{ steps.set_vars.outputs.version }}-win64.msi" "contour-${{ steps.set_vars.outputs.version }}-win64.msi" | |
mv "build\Contour-${{ steps.set_vars.outputs.version }}-win64.zip" "contour-${{ steps.set_vars.outputs.version }}-win64.zip" | |
- name: "Inspect again" | |
run: Get-ChildItem | |
- name: "Uploading MSI to artifact store" | |
uses: actions/upload-artifact@v3 | |
with: | |
name: "contour-${{ steps.set_vars.outputs.version }}-win64.msi" | |
path: "contour-${{ steps.set_vars.outputs.version }}-win64.msi" | |
if-no-files-found: error | |
retention-days: 7 | |
- name: "Uploading ZIP to artifact store" | |
uses: actions/upload-artifact@v3 | |
with: | |
name: "contour-${{ steps.set_vars.outputs.version }}-win64.zip" | |
path: "contour-${{ steps.set_vars.outputs.version }}-win64.zip" | |
if-no-files-found: error | |
retention-days: 7 | |
# }}} | |
# {{{ Ubuntu CC matrix | |
ubuntu_2204_cc_matrix: | |
strategy: | |
fail-fast: false | |
matrix: | |
cxx: [20] | |
build_type: ["RelWithDebInfo"] | |
compiler: | |
[ | |
"GCC 10", | |
"Clang 15", | |
] | |
qt_version: [6] | |
name: "Ubuntu Linux 22.04 (${{ matrix.compiler }}, C++${{ matrix.cxx }}, Qt${{ matrix.qt_version }})" | |
runs-on: ubuntu-22.04 | |
outputs: | |
id: "${{ matrix.compiler }} (C++${{ matrix.cxx }}, ${{ matrix.build_type }}, ${{ matrix.qt_version }})" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: ccache | |
uses: hendrikmuhs/[email protected] | |
with: | |
key: "ccache-ubuntu2204-${{ matrix.compiler }}-${{ matrix.cxx }}-${{ matrix.build_type }}-${{ matrix.qt_version }}" | |
max-size: 256M | |
- name: "update APT database" | |
run: sudo apt -q update | |
- name: Installing xmllint for ci-set-vars | |
run: sudo apt -qy install libxml2-utils | |
- name: set environment variables | |
id: set_vars | |
run: ./scripts/ci-set-vars.sh | |
env: | |
REPOSITORY: ${{ github.event.repository.name }} | |
- name: "Set up output var: CC_VERSION" | |
id: extract_matrix | |
run: | | |
CC_VERSION=$( echo "${{ matrix.compiler }}" | awk '{ print $2; }') | |
echo "CC_VERSION=${CC_VERSION}" >> "$GITHUB_OUTPUT" | |
- name: "Set up QTVER var" | |
id: set_qtver | |
run: | | |
if [[ ${{ matrix.qt_version }} = "5" ]]; then | |
echo "QTVER=5" >> "$GITHUB_OUTPUT" | |
else | |
echo "QTVER=6" >> "$GITHUB_OUTPUT" | |
fi | |
- name: "install dependencies" | |
run: sudo env QTVER="${{ matrix.qt_version }}" ./scripts/install-deps.sh | |
- name: "Post-fix embedded dependency permissions." | |
run: sudo find _deps/sources -exec chown $UID {} \; | |
- name: Install GCC | |
if: ${{ startsWith(matrix.compiler, 'GCC') }} | |
run: sudo apt install -y g++-${{ steps.extract_matrix.outputs.CC_VERSION }} | |
- name: Install Clang | |
if: ${{ startsWith(matrix.compiler, 'Clang') }} | |
run: sudo apt install -y clang-${{ steps.extract_matrix.outputs.CC_VERSION }} | |
- name: Install Clang-Tidy | |
if: ${{ startsWith(matrix.compiler, 'Clang') }} | |
run: sudo apt install -y clang-tidy-${{ steps.extract_matrix.outputs.CC_VERSION }} | |
- name: "create build directory" | |
run: mkdir build | |
- name: CMake version | |
run: cmake --version | |
- name: "cmake" | |
run: | | |
CC_NAME=$(echo "${{ matrix.compiler }}" | awk '{ print tolower($1); }') | |
CC_VER=$( echo "${{ matrix.compiler }}" | awk '{ print $2; }') | |
test "${CC_NAME}" = "clang" && CC_EXE="clang++" | |
test "${CC_NAME}" = "gcc" && CC_EXE="g++" | |
test "${{ matrix.compiler }}" = "GCC 8" && EXTRA_CMAKE_FLAGS="$EXTRA_CMAKE_FLAGS -DPEDANTIC_COMPILER_WERROR=ON" | |
test "${{ startsWith(matrix.compiler, 'Clang') }}" = "true" && EXTRA_CMAKE_FLAGS="$EXTRA_CMAKE_FLAGS -DENABLE_TIDY=ON" | |
BUILD_DIR="build" \ | |
CMAKE_BUILD_TYPE="${{ matrix.build_type }}" \ | |
CXX="${CC_EXE}-${CC_VER}" \ | |
EXTRA_CMAKE_FLAGS="$EXTRA_CMAKE_FLAGS \ | |
-DCMAKE_CXX_STANDARD=${{ matrix.cxx }} \ | |
-DCMAKE_INSTALL_PREFIX="/usr" \ | |
-DCONTOUR_INSTALL_TOOLS=ON \ | |
-DCONTOUR_QT_VERSION=${{ matrix.qt_version }} \ | |
-DPEDANTIC_COMPILER=ON \ | |
-DLIBTERMINAL_BUILD_BENCH_HEADLESS=ON \ | |
-DLIBUNICODE_UCD_BASE_DIR=$(pwd)/_ucd \ | |
" \ | |
./scripts/ci-prepare-contour.sh | |
- name: "build" | |
run: cmake --build build/ -- -j3 | |
- name: "test: crispy" | |
run: ./build/src/crispy/crispy_test | |
- name: "test: vtparser" | |
run: ./build/src/vtparser/vtparser_test | |
- name: "test: vtbackend" | |
run: ./build/src/vtbackend/vtbackend_test | |
- name: "Upload unit tests" | |
if: ${{ matrix.compiler == 'GCC 10' && matrix.cxx == '20' && matrix.qt_version == '6' }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: contour-ubuntu2204-tests | |
path: | | |
build/src/crispy/crispy_test | |
build/src/vtparser/vtparser_test | |
build/src/vtbackend/vtbackend_test | |
build/src/vtbackend/bench-headless | |
test/images | |
retention-days: 1 | |
# }}} | |
# {{{ Linux AppImage (Using Ubuntu 20.04 as base). | |
# package_for_AppImage: | |
# name: "Packaging for AppImage" | |
# runs-on: ubuntu-20.04 | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - name: ccache | |
# uses: hendrikmuhs/[email protected] | |
# with: | |
# key: "ccache-ubuntu2004-AppImage" | |
# max-size: 256M | |
# - name: Installing xmllint for ci-set-vars | |
# run: sudo apt -qy install libxml2-utils | |
# - name: "set environment variables" | |
# id: set_vars | |
# run: ./scripts/ci-set-vars.sh | |
# env: | |
# REPOSITORY: ${{ github.event.repository.name }} | |
# - name: "install linuxdeploy" | |
# run: | | |
# wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage -O /usr/local/bin/linuxdeploy | |
# chmod 0755 /usr/local/bin/linuxdeploy | |
# wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage -O /usr/local/bin/linuxdeploy-plugin-qt-x86_64.AppImage | |
# chmod 0755 /usr/local/bin/linuxdeploy-plugin-qt-x86_64.AppImage | |
# - name: "install libfuse2 (Dependency of AppImage programs)" | |
# run: sudo apt -qy install libfuse2 | |
# - name: "install dependencies" | |
# run: sudo ./scripts/install-deps.sh | |
# - name: "Post-fix embedded dependency permissions." | |
# run: sudo find _deps/sources -exec chown $UID {} \; | |
# - name: CMake version | |
# run: cmake --version | |
# - name: "cmake" | |
# run: | | |
# mkdir build | |
# BUILD_DIR="build" \ | |
# CXX="g++-10" \ | |
# CMAKE_BUILD_TYPE=RelWithDebInfo \ | |
# EXTRA_CMAKE_FLAGS="$EXTRA_CMAKE_FLAGS \ | |
# -DCMAKE_INSTALL_PREFIX="/usr" \ | |
# -DCONTOUR_INSTALL_TOOLS=ON \ | |
# -DPEDANTIC_COMPILER=ON \ | |
# -DPEDANTIC_COMPILER_WERROR=OFF \ | |
# " \ | |
# ./scripts/ci-prepare-contour.sh | |
# - name: "build" | |
# run: cmake --build build/ -- -j3 | |
# - name: "test: crispy" | |
# run: ./build/src/crispy/crispy_test | |
# - name: "test: vtparser" | |
# run: ./build/src/vtparser/vtparser_test | |
# - name: "test: vtbackend" | |
# run: ./build/src/vtbackend/vtbackend_test | |
# - name: "linuxdeploy: Creating AppImage" | |
# run: | | |
# set -ex | |
# cd build | |
# make install DESTDIR=AppDir | |
# # NB: The appdir path must be given absolute rather than relative, as otherwise the qt plugin won't work. | |
# DEBUG=1 QT_SELECT=5 linuxdeploy --appdir "$(pwd)/AppDir" --plugin qt --output appimage | |
# mv -v *.AppImage ../contour-${{ steps.set_vars.outputs.VERSION_STRING }}.AppImage | |
# - name: "Testing AppImage" | |
# run: ./contour-${{ steps.set_vars.outputs.VERSION_STRING }}.AppImage version | |
# - name: "Uploading AppImage" | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# name: "contour-${{ steps.set_vars.outputs.VERSION_STRING }}.AppImage" | |
# path: "contour-${{ steps.set_vars.outputs.VERSION_STRING }}.AppImage" | |
# if-no-files-found: error | |
# retention-days: 7 | |
# }}} | |
# {{{ Ubuntu 18.04 | |
ubuntu18: | |
strategy: | |
matrix: | |
arch: | |
[ | |
"linux/amd64 x86_64" | |
] | |
name: "Packaging for Ubuntu 18.04" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: all | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v2 | |
with: | |
version: latest | |
- name: Read info | |
id: tags | |
shell: bash | |
run: | | |
arch="${{ matrix.arch }}" | |
echo "PLATFORM=${arch%% *}" >> "$GITHUB_OUTPUT" | |
echo "ARCH=${arch##* }" >> "$GITHUB_OUTPUT" | |
- name: Installing xmllint for ci-set-vars | |
run: sudo apt -qy install libxml2-utils | |
- name: set environment variables | |
id: set_vars | |
run: ./scripts/ci-set-vars.sh | |
env: | |
REPOSITORY: ${{ github.event.repository.name }} | |
- name: Build ${{ matrix.arch }} release | |
shell: bash | |
run: | | |
docker buildx build --platform ${{ steps.tags.outputs.PLATFORM }} \ | |
--tag contour:${{ steps.tags.outputs.ARCH }} \ | |
-f .github/ubuntu18/Dockerfile \ | |
--load \ | |
. | |
docker create --name contour-${{ steps.tags.outputs.ARCH }} contour:${{ steps.tags.outputs.ARCH }} | |
docker cp contour-${{ steps.tags.outputs.ARCH }}:/home/docker/contour/package.deb \ | |
"contour-${{ steps.set_vars.outputs.VERSION_STRING }}-ubuntu18.04-amd64.deb" | |
docker cp contour-${{ steps.tags.outputs.ARCH }}:/home/docker/contour/package.ddeb \ | |
"contour-dbgsym-${{ steps.set_vars.outputs.VERSION_STRING }}-ubuntu18.04-amd64.ddeb" | |
docker container rm contour-${{ steps.tags.outputs.ARCH }} | |
- name: "Uploading artifact .deb package" | |
uses: actions/upload-artifact@v3 | |
with: | |
name: "contour-${{ steps.set_vars.outputs.VERSION_STRING }}-ubuntu18.04-amd64.deb" | |
path: | | |
contour-${{ steps.set_vars.outputs.VERSION_STRING }}-ubuntu18.04-amd64.deb | |
contour-${{ steps.set_vars.outputs.VERSION_STRING }}-ubuntu18.04-amd64.ddeb | |
if-no-files-found: error | |
retention-days: 7 | |
# }}} | |
# {{{ Ubuntu 20.04 / 22.04 | |
package_for_Ubuntu: | |
name: "Packaging for Ubuntu ${{ matrix.os_version }}" | |
strategy: | |
fail-fast: false | |
matrix: | |
os_version: ['20.04', '22.04'] | |
runs-on: ubuntu-${{ matrix.os_version }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: "update APT database" | |
run: sudo apt -q update | |
- name: Installing xmllint for ci-set-vars | |
run: sudo apt -qy install libxml2-utils | |
- name: set variables | |
id: set_vars | |
run: ./scripts/ci-set-vars.sh | |
env: | |
REPOSITORY: ${{ github.event.repository.name }} | |
- name: ccache | |
uses: hendrikmuhs/[email protected] | |
with: | |
key: "ccache-ubuntu-${{ matrix.os_version }}" | |
max-size: 256M | |
- name: set QTVER | |
id: set_qtver | |
run: | | |
if [[ ${{ matrix.os_version }} = "20.04" ]]; then | |
echo "QTVER=5" >> "$GITHUB_OUTPUT" | |
fi | |
- name: "install dependencies" | |
run: sudo env QTVER="${{ steps.set_qtver.outputs.QTVER }}" ./scripts/install-deps.sh | |
- name: "Post-fix embedded dependency permissions." | |
run: sudo find _deps/sources -exec chown $UID {} \; | |
- name: "create build directory" | |
run: mkdir build | |
- name: CMake version | |
run: cmake --version | |
- name: "cmake" | |
run: | | |
# TODO: turn on -Werror again, that requires some code changes. | |
CMAKE_CXX_STANDARD=20 | |
if [[ "${{ matrix.os_version }}" = "20.04" ]]; then | |
EXTRA_CMAKE_FLAGS="$EXTRA_CMAKE_FLAGS -DCONTOUR_QT_VERSION=5" | |
else | |
# use Qt6 for 22.04 | |
EXTRA_CMAKE_FLAGS="$EXTRA_CMAKE_FLAGS -DCONTOUR_QT_VERSION=6" | |
fi | |
BUILD_DIR="build" \ | |
CMAKE_BUILD_TYPE=RelWithDebInfo \ | |
EXTRA_CMAKE_FLAGS="$EXTRA_CMAKE_FLAGS \ | |
-DCMAKE_CXX_STANDARD=$CMAKE_CXX_STANDARD \ | |
-DCMAKE_INSTALL_PREFIX="/usr" \ | |
-DCONTOUR_INSTALL_TOOLS=ON \ | |
-DLIBTERMINAL_BUILD_BENCH_HEADLESS=ON \ | |
-DPEDANTIC_COMPILER=ON \ | |
-DPEDANTIC_COMPILER_WERROR=OFF \ | |
" \ | |
./scripts/ci-prepare-contour.sh | |
- name: "build" | |
run: cmake --build build/ -- -j3 | |
- name: "test: crispy" | |
run: ./build/src/crispy/crispy_test | |
- name: "test: vtparser" | |
run: ./build/src/vtparser/vtparser_test | |
- name: "test: vtbackend" | |
run: ./build/src/vtbackend/vtbackend_test | |
- name: "CPack: Creating DEB package" | |
run: | | |
set -ex | |
cd build | |
cpack -G DEB -V | |
OS_VERSION=${{ matrix.os_version }} | |
OS_VERSION=${OS_OVERRIDE/./_} | |
mv -v "Contour-${{ steps.set_vars.outputs.VERSION_STRING }}-Linux-contour.deb" \ | |
"../contour-${{ steps.set_vars.outputs.VERSION_STRING }}-ubuntu${{ matrix.os_version }}-amd64.deb" | |
mv -v "Contour-${{ steps.set_vars.outputs.VERSION_STRING }}-Linux-contour-dbgsym.ddeb" \ | |
"../contour-dbgsym-${{ steps.set_vars.outputs.VERSION_STRING }}-ubuntu${{ matrix.os_version }}-amd64.ddeb" | |
- name: "Uploading artifact .deb package" | |
uses: actions/upload-artifact@v3 | |
with: | |
name: "contour-${{ steps.set_vars.outputs.VERSION_STRING }}-ubuntu${{ matrix.os_version }}-amd64.deb" | |
path: | | |
contour-${{ steps.set_vars.outputs.VERSION_STRING }}-ubuntu${{ matrix.os_version }}-amd64.deb | |
contour-dbgsym-${{ steps.set_vars.outputs.VERSION_STRING }}-ubuntu${{ matrix.os_version }}-amd64.ddeb | |
if-no-files-found: error | |
retention-days: 7 | |
- name: "Attempt installing the created .deb" | |
run: | | |
sudo dpkg --install "contour-${{ steps.set_vars.outputs.VERSION_STRING }}-ubuntu${{ matrix.os_version }}-amd64.deb" | |
sudo dpkg --install "contour-dbgsym-${{ steps.set_vars.outputs.VERSION_STRING }}-ubuntu${{ matrix.os_version }}-amd64.ddeb" | |
# }}} | |
# {{{ Ubuntu 22.04: test via valgrind | |
test_ubuntu2204_valgrind: | |
name: "Run tests via valgrind" | |
runs-on: ubuntu-22.04 | |
needs: [ubuntu_2204_cc_matrix] | |
steps: | |
- name: "download artifact" | |
uses: actions/download-artifact@v3 | |
with: | |
name: contour-ubuntu2204-tests | |
- name: "update APT database" | |
run: sudo apt -q update | |
- name: "fix unit test permissions" | |
run: | | |
find . -name '*_test' -exec chmod 0755 {} \; | |
find . -name 'bench-headless' -exec chmod 0755 {} \; | |
- name: "install dependencies" | |
run: | | |
set -ex | |
ls -hlR | |
sudo apt install -y \ | |
libfontconfig1 \ | |
libfreetype6 \ | |
libharfbuzz0b \ | |
libqt5gui5 \ | |
libqt5opengl5 \ | |
libyaml-cpp0.7 \ | |
ncurses-bin \ | |
valgrind | |
- name: "test: crispy (via valgrind)" | |
run: valgrind --error-exitcode=64 ./build/src/crispy/crispy_test | |
- name: "test: vtparser (via valgrind)" | |
run: valgrind --error-exitcode=64 ./build/src/vtparser/vtparser_test | |
- name: "test: vtbackend (via valgrind)" | |
run: valgrind --error-exitcode=64 ./build/src/vtbackend/vtbackend_test | |
# }}} | |
# {{{ Ubuntu 22.04: Test bench-headless | |
test_ubuntu2204_bench_headless: | |
strategy: | |
matrix: | |
test_case: | |
[ | |
"grid cat", | |
"grid long" | |
] | |
name: "Run bench-headless" | |
runs-on: ubuntu-22.04 | |
needs: [ubuntu_2204_cc_matrix] | |
steps: | |
- name: "download artifact" | |
uses: actions/download-artifact@v3 | |
with: | |
name: contour-ubuntu2204-tests | |
- name: "update APT database" | |
run: sudo apt -q update | |
- name: "fix unit test permissions" | |
run: | | |
find . -name '*_test' -exec chmod 0755 {} \; | |
find . -name 'bench-headless' -exec chmod 0755 {} \; | |
- name: "install dependencies" | |
run: | | |
set -ex | |
ls -hlR | |
sudo apt install -y \ | |
libfontconfig1 \ | |
libfreetype6 \ | |
libharfbuzz0b \ | |
libqt5gui5 \ | |
libqt5opengl5 \ | |
libyaml-cpp0.7 \ | |
ncurses-bin \ | |
valgrind | |
- name: "bench-headless: ${{ matrix.test_case }}" | |
run: valgrind --error-exitcode=64 ./build/src/vtbackend/bench-headless ${{ matrix.test_case }} size 1 | |
# }}} | |
# {{{ Ubuntu check matrix | |
check_ubuntu2204_matrix_test_matrix: | |
if: ${{ always() }} | |
runs-on: ubuntu-latest | |
name: "Ubuntu Linux 22.04 post-check" | |
needs: | |
- package_for_Ubuntu | |
- ubuntu_2204_cc_matrix | |
- test_ubuntu2204_valgrind | |
- test_ubuntu2204_bench_headless | |
steps: | |
- name: Print matrix status | |
run: | | |
echo "Result (CC matrix) : ${{ needs.ubuntu_2204_cc_matrix.result }}" | |
echo "Result (packaging matrix) : ${{ needs.package_for_Ubuntu.result }}" | |
- name: Check build matrix status | |
if: ${{ needs.ubuntu_2204_cc_matrix.result != 'success' && needs.ubuntu_2204_cc_matrix.result != 'skipped' }} | |
run: exit 1 | |
- name: Check package_for_Ubuntu matrix status | |
if: ${{ needs.package_for_Ubuntu.result != 'success' && needs.package_for_Ubuntu.result != 'skipped' }} | |
run: exit 1 | |
- name: "Delete artifact: contour-ubuntu2204-tests" | |
uses: geekyeggo/delete-artifact@v2 | |
with: | |
name: contour-ubuntu2204-tests | |
# }}} | |
# {{{ Build fontconfig | |
build_fontconfig: | |
name: "Build patched fontconfig" | |
strategy: | |
fail-fast: false | |
matrix: | |
os_version: ['20.04', '22.04'] | |
runs-on: ubuntu-${{ matrix.os_version }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: "get source" | |
run: | | |
set -ex | |
wget https://www.freedesktop.org/software/fontconfig/release/fontconfig-2.13.1.tar.gz | |
tar xzpf fontconfig-2.13.1.tar.gz | |
# sudo tee -a /etc/apt/sources.list < <(echo "deb-src http://azure.archive.ubuntu.com/ubuntu/ focal main restricted") | |
# sudo apt update | |
# apt source libfontconfig1 | |
sudo apt install -y gperf | |
ls -hl | |
- name: "patch it" | |
run: | | |
set -ex | |
cd fontconfig-2.13.1 | |
patch --verbose -p1 < ../.github/fontconfig-memleak-fix.patch | |
- name: "configure" | |
run: | | |
set -ex | |
export CFLAGS="-O0 -ggdb3" | |
cd fontconfig-2.13.1 | |
mkdir build | |
cd build | |
../configure --prefix="/home/runner/opt/fontconfig" | |
- name: "build & install" | |
run: | | |
set -ex | |
cd fontconfig-2.13.1/build | |
make -j3 | |
make install | |
- name: "Uploading artifact" | |
uses: actions/upload-artifact@v3 | |
with: | |
name: "patched-fontconfig-${{ matrix.os_version }}" | |
path: "/home/runner/opt/fontconfig" | |
if-no-files-found: error | |
retention-days: 3 | |
# }}} | |
# {{{ Build notcurses | |
build_notcurses: | |
name: "Build notcurses" | |
strategy: | |
fail-fast: false | |
matrix: | |
os_version: ['20.04', '22.04'] | |
runs-on: ubuntu-${{ matrix.os_version }} | |
steps: | |
- name: "update APT database" | |
run: sudo apt -q update | |
- name: "install dependencies" | |
run: | | |
set -ex | |
sudo apt install -y \ | |
build-essential \ | |
cmake \ | |
doctest-dev \ | |
ffmpeg \ | |
libavcodec-dev \ | |
libavdevice-dev \ | |
libavformat-dev \ | |
libavutil-dev \ | |
libdeflate-dev \ | |
libncurses-dev \ | |
libqrcodegen-dev \ | |
libswscale-dev \ | |
libunistring-dev \ | |
xvfb | |
- name: "git clone" | |
run: git clone https://github.com/dankamongmen/notcurses.git | |
- name: ccache | |
uses: hendrikmuhs/[email protected] | |
with: | |
key: ccache-ubuntu_2204-notcurses | |
max-size: 256M | |
- name: "configure cmake" | |
run: | | |
cmake -DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_INSTALL_PREFIX=~/opt/notcurses \ | |
-DCMAKE_C_COMPILER_LAUNCHER=ccache \ | |
-DUSE_CPP=OFF \ | |
-DUSE_DEFLATE=OFF \ | |
-DUSE_MULTIMEDIA=ffmpeg \ | |
-DUSE_PANDOC=OFF \ | |
-DUSE_STATIC=ON \ | |
-S notcurses \ | |
-B notcurses/build | |
- name: "Build notcurses" | |
run: cmake --build notcurses/build/ -- -j3 | |
- name: "Install notcurses" | |
run: cmake --build notcurses/build --config Release --target install/strip | |
- name: "Uploading artifact" | |
uses: actions/upload-artifact@v3 | |
with: | |
name: "notcurses-install-${{ matrix.os_version }}" | |
path: ~/opt/notcurses | |
if-no-files-found: error | |
retention-days: 1 | |
# }}} | |
# {{{ GUI: test: contour quick shell exit | |
test_quick_exit: | |
name: "GUI: Quick Shell Exit" | |
needs: [package_for_Ubuntu, build_fontconfig] | |
strategy: | |
fail-fast: false | |
matrix: | |
os_version: ['20.04', '22.04'] | |
runs-on: ubuntu-${{ matrix.os_version }} | |
env: | |
LD_LIBRARY_PATH: /home/runner/opt/fontconfig/lib | |
# I'm giving up on eliminating all leaks for now. | |
# There are still some deep inside Qt I can't explain myself if it's because of me. | |
ASAN_OPTIONS: detect_leaks=0 | |
# Can be used to execute contour within a certain environment, such as valgrind: | |
# Valgrind is much more precise, but 10x slower. | |
CONTOUR_PREFIX: "" # valgrind --leak-check=full --num-callers=64 --error-exitcode=112" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: "update APT database" | |
run: sudo apt -q update | |
- name: Installing xmllint for ci-set-vars | |
run: sudo apt -qy install libxml2-utils | |
- name: set environment variables | |
id: set_vars | |
run: ./scripts/ci-set-vars.sh | |
env: | |
REPOSITORY: ${{ github.event.repository.name }} | |
- uses: actions/download-artifact@v3 | |
with: | |
name: "contour-${{ steps.set_vars.outputs.VERSION_STRING }}-ubuntu${{ matrix.os_version }}-amd64.deb" | |
- uses: actions/download-artifact@v3 | |
with: | |
name: "patched-fontconfig-${{ matrix.os_version }}" | |
path: "/home/runner/opt/fontconfig" | |
- name: "install dependencies" | |
run: ./scripts/ci/notcurses-install-deps.sh | |
- name: "install contour" | |
run: sudo dpkg -i "contour-${{ steps.set_vars.outputs.VERSION_STRING }}-ubuntu${{ matrix.os_version }}-amd64.deb" | |
- name: "contour executable test" | |
run: | | |
contour version | |
contour help | |
- name: "create and patch contour.yml config file" | |
run: | | |
set -ex | |
mkdir -p ~/.config/contour/ | |
contour generate config to ~/.config/contour/contour.yml | |
sed -i -e 's/locator: native/locator: mock/' ~/.config/contour/contour.yml | |
sed -i -e 's/strict_spacing: true/strict_spacing: false/' ~/.config/contour/contour.yml | |
cat .github/mock-font-locator.yml >> ~/.config/contour/contour.yml | |
cat ~/.config/contour/contour.yml | |
- name: "Run Contour: quick exit" | |
timeout-minutes: 5 | |
id: Xvfb-contour | |
run: | | |
# export LD_LIBRARY_PATH="/home/runner/opt/fontconfig/lib" | |
./scripts/ci/Xvfb-contour-run.sh \ | |
"quick-exit-dumps/${{ matrix.name }}" \ | |
true | |
- name: "Save dump" | |
uses: actions/upload-artifact@v3 | |
with: | |
name: quick-exit-contour-dump | |
path: quick-exit-dumps | |
if-no-files-found: ignore | |
retention-days: 3 | |
- name: "Check result success" | |
run: | | |
exit ${{ steps.Xvfb-contour.outputs.exitCode }} | |
# }}} | |
# {{{ GUI: external test: notcurses | |
test_notcurses: | |
name: "GUI: notcurses-demo ${{ matrix.name }}" | |
runs-on: ubuntu-22.04 | |
needs: [package_for_Ubuntu, build_notcurses, build_fontconfig] | |
strategy: | |
fail-fast: false | |
matrix: | |
include: # {{{ (name, id) tuples | |
# ixetunchmdbkywjgarvlsfqzo | |
- name: 'aanimate' | |
id: 'a' | |
- name: 'box' | |
id: 'b' | |
- name: 'chunli' | |
id: 'c' | |
- name: 'dragon' | |
id: 'd' | |
- name: 'eagle' | |
id: 'e' | |
- name: 'fission' | |
id: 'f' | |
- name: 'grid' | |
id: 'g' | |
- name: 'highcon' | |
id: 'h' | |
- name: 'intro' | |
id: 'i' | |
- name: 'jungle' | |
id: 'j' | |
- name: 'keller' | |
id: 'k' | |
- name: 'luigi' | |
id: 'l' | |
- name: 'mojibake' | |
id: 'm' | |
- name: 'normal' | |
id: 'n' | |
- name: 'outro' | |
id: 'o' | |
- name: 'qrcode' | |
id: 'q' | |
- name: 'reel' | |
id: 'r' | |
- name: 'sliders' | |
id: 's' | |
- name: 'trans' | |
id: 't' | |
- name: 'uniblock' | |
id: 'u' | |
- name: 'view' | |
id: 'v' | |
- name: 'whiteout' | |
id: 'w' | |
- name: 'xray' | |
id: 'x' | |
- name: 'yield' | |
id: 'y' | |
- name: 'zoo' | |
id: 'z' | |
# }}} | |
env: | |
LD_LIBRARY_PATH: /home/runner/opt/notcurses/lib:/home/runner/opt/fontconfig/lib | |
# I'm giving up on eliminating all leaks for now. | |
# There are still some deep inside Qt I can't explain myself if it's because of me. | |
ASAN_OPTIONS: detect_leaks=0 | |
# Can be used to execute contour within a certain environment, such as valgrind: | |
# Valgrind is much more precise, but 10x slower. | |
CONTOUR_PREFIX: "" # valgrind --leak-check=full --num-callers=64 --error-exitcode=112" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: "update APT database" | |
run: sudo apt -q update | |
- name: Installing xmllint for ci-set-vars | |
run: sudo apt -qy install libxml2-utils | |
- name: set environment variables | |
id: set_vars | |
run: ./scripts/ci-set-vars.sh | |
env: | |
REPOSITORY: ${{ github.event.repository.name }} | |
- uses: actions/download-artifact@v3 | |
with: | |
name: "contour-${{ steps.set_vars.outputs.VERSION_STRING }}-ubuntu22.04-amd64.deb" | |
- uses: actions/download-artifact@v3 | |
with: | |
name: "notcurses-install-22.04" | |
path: ~/opt/notcurses | |
- uses: actions/download-artifact@v3 | |
with: | |
name: "patched-fontconfig-22.04" | |
path: "/home/runner/opt/fontconfig" | |
- name: "fix executable bits" | |
run: | | |
chmod 0755 ~/opt/notcurses/bin/* | |
chmod 0755 ~/opt/*/lib/* | |
ls -hlR ~/opt/ | |
- name: "install dependencies" | |
run: ./scripts/ci/notcurses-install-deps.sh | |
- name: "Run notcurses-demo -h" | |
timeout-minutes: 1 | |
run: ~/opt/notcurses/bin/notcurses-demo -p ~/opt/notcurses/share/notcurses -h | |
- name: "install contour" | |
run: sudo dpkg -i "contour-${{ steps.set_vars.outputs.VERSION_STRING }}-ubuntu22.04-amd64.deb" | |
- name: "contour executable test" | |
run: | | |
contour version | |
contour help | |
ls -hl ~/opt/notcurses/ | |
- name: "create and patch contour.yml config file" | |
run: | | |
set -ex | |
mkdir -p ~/.config/contour/ | |
contour generate config to ~/.config/contour/contour.yml | |
sed -i -e 's/locator: native/locator: mock/' ~/.config/contour/contour.yml | |
sed -i -e 's/strict_spacing: true/strict_spacing: false/' ~/.config/contour/contour.yml | |
cat .github/mock-font-locator.yml >> ~/.config/contour/contour.yml | |
cat ~/.config/contour/contour.yml | |
- name: "Run Contour: notcurses-demo ${{ matrix.name }}" | |
timeout-minutes: 5 | |
id: Xvfb-contour-notcurses | |
run: | | |
# export LD_LIBRARY_PATH="/home/runner/opt/notcurses/lib:/home/runner/opt/fontconfig/lib" | |
./scripts/ci/Xvfb-contour-run.sh \ | |
"notcurses-demo-dumps/${{ matrix.name }}" \ | |
~/opt/notcurses/bin/notcurses-demo \ | |
-p ~/opt/notcurses/share/notcurses ${{ matrix.id }} | |
- name: "Save dump" | |
uses: actions/upload-artifact@v3 | |
with: | |
name: notcurses-contour-dump | |
path: notcurses-demo-dumps | |
if-no-files-found: ignore | |
retention-days: 3 | |
- name: "Check result success" | |
run: | | |
exit ${{ steps.Xvfb-contour-notcurses.outputs.exitCode }} | |
check_notcurses_test_matrix: | |
if: ${{ always() }} | |
runs-on: ubuntu-latest | |
name: tests matrix | |
needs: test_notcurses | |
steps: | |
- name: Check build matrix status | |
if: ${{ needs.test_notcurses.result != 'success' }} | |
run: exit 1 | |
# }}} | |
# {{{ Check Ubuntu package | |
check_package_ubuntu: | |
name: "Check packages for Ubuntu " | |
strategy: | |
fail-fast: false | |
matrix: | |
os_version: ['20.04', '22.04'] | |
runs-on: ubuntu-${{ matrix.os_version}} | |
needs: [package_for_Ubuntu] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Installing xmllint for ci-set-vars | |
run: sudo apt -qy install libxml2-utils | |
- name: set environment variables | |
id: set_vars | |
run: ./scripts/ci-set-vars.sh | |
env: | |
REPOSITORY: ${{ github.event.repository.name }} | |
- uses: actions/download-artifact@v3 | |
with: | |
name: "contour-${{ steps.set_vars.outputs.VERSION_STRING }}-ubuntu${{ matrix.os_version }}-amd64.deb" | |
- name: "Check install package" | |
run: | | |
sudo apt install "./contour-${{ steps.set_vars.outputs.VERSION_STRING }}-ubuntu${{ matrix.os_version}}-amd64.deb" | |
# }}} | |
# {{{ Release | |
check_release: | |
if: startsWith(github.ref, 'refs/tags/v') | |
name: Check Release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Installing xmllint for ci-set-vars.sh and check-release.sh | |
run: sudo apt -qy install libxml2-utils | |
- name: set variables | |
id: set_vars | |
run: ./scripts/ci-set-vars.sh | |
env: | |
REPOSITORY: ${{ github.event.repository.name }} | |
- name: run release checks | |
run: ./scripts/check-release.sh | |
do_release: | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
name: Create Github release | |
runs-on: ubuntu-latest | |
needs: | |
- check_release | |
- archlinux | |
- check_notcurses_test_matrix | |
- fedora | |
- osx | |
- package_for_Ubuntu | |
- ubuntu18 | |
- windows | |
permissions: | |
# We need write permissions on contents to create GitHub releases and on | |
# discussions to create the release announcement in the discussion forums | |
contents: write | |
discussions: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Installing xmllint for ci-set-vars | |
run: sudo apt -qy install libxml2-utils | |
- name: set variables | |
id: set_vars | |
run: ./scripts/ci-set-vars.sh | |
env: | |
REPOSITORY: ${{ github.event.repository.name }} | |
# {{{ fetch release artifacts | |
- name: "fetch artifact: Ubuntu 18.04" | |
uses: actions/download-artifact@v3 | |
with: | |
name: contour-${{ steps.set_vars.outputs.VERSION_STRING }}-ubuntu18.04-amd64.deb | |
- name: "fetch artifact: Ubuntu 20.04" | |
uses: actions/download-artifact@v3 | |
with: | |
name: contour-${{ steps.set_vars.outputs.VERSION_STRING }}-ubuntu20.04-amd64.deb | |
- name: "fetch artifact: Ubuntu 22.04" | |
uses: actions/download-artifact@v3 | |
with: | |
name: contour-${{ steps.set_vars.outputs.VERSION_STRING }}-ubuntu22.04-amd64.deb | |
- name: "fetch artifact: Fedora 39" | |
uses: actions/download-artifact@v3 | |
with: | |
name: "contour-${{ steps.set_vars.outputs.VERSION }}-1.fc39.x86_64.rpm" | |
- name: "fetch artifact: ArchLinux" | |
uses: actions/download-artifact@v3 | |
with: | |
name: "contour-${{ steps.tags.outputs.ARCH }}.pkg.tar.zst" | |
- name: "fetch artifact: MacOS" | |
uses: actions/download-artifact@v3 | |
with: | |
name: "contour-${{ steps.set_vars.outputs.version }}-osx.dmg" | |
- name: "fetch artifact: Windows" | |
uses: actions/download-artifact@v3 | |
with: | |
name: "contour-${{ steps.set_vars.outputs.version }}-win64.msi" | |
# }}} | |
- name: "inspect" | |
run: ls -lisahF | |
- name: inspect recurse | |
run: pwd; ls -hlaR | |
# ------------------------------------------------------------- | |
- name: Create Github release page | |
id: create_release | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # token provided by Actions | |
with: | |
tag_name: v${{ steps.set_vars.outputs.version }}${{ steps.set_vars.outputs.tag_suffix}} | |
name: Contour ${{ steps.set_vars.outputs.version }} ${{ steps.set_vars.outputs.RELEASENAME_SUFFIX}} | |
body_path: ${{ github.workspace }}/release-body.md | |
draft: true | |
prerelease: ${{ steps.set_vars.outputs.IS_PRERELEASE }} | |
fail_on_unmatched_files: true | |
files: | | |
*.deb | |
*.ddeb | |
*.rpm | |
*.dmg | |
*.msi | |
*-archlinux* | |
*.zip | |
# *.AppImage | |
# }}} |