Add windows to test.yml
MODIFY
.github/workflows/linux-release.yml
.github/workflows/linux-release.yml
@@ -61,7 +61,7 @@ jobs:
mv Ripes appdir/usr/bin/
wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
chmod a+x linuxdeployqt-continuous-x86_64.AppImage
- source .github/scripts/set_version.sh
+ source .github/workflows/scripts/set_version.sh
export VERSION=${RIPES_VERSION}-linux # linuxdeployqt uses this for naming the package
echo "Version is: ${VERSION}"
./linuxdeployqt-continuous-x86_64.AppImage --appimage-extract-and-run appdir/usr/share/applications/*.desktop \

MODIFY
.github/workflows/mac-release.yml
.github/workflows/mac-release.yml
@@ -44,7 +44,7 @@ jobs:
- name: package artifacts
run: |
macdeployqt Ripes.app
- source .github/scripts/set_version.sh
+ source .github/workflows/scripts/set_version.sh
export APPNAME=Ripes-${RIPES_VERSION}-mac-x86_64
echo "APPNAME=${APPNAME}" >> $GITHUB_ENV
sudo mv Ripes.app ${APPNAME}.app

ADD
.github/workflows/scripts/run_tests.sh
+#!/bin/bash
+
+# Fail on failing QTest execution
+set -e
+
+pushd test
+
+find . -executable -type f -name "tst_*" | while read line; do
+ echo "Running unit test: "
+ echo "${line}"
+ ($line)
+done
\ No newline at end of file

RENAME
.github/scripts/set_version.sh
.github/workflows/scripts/set_version.sh
MODIFY
.github/workflows/test.yml
.github/workflows/test.yml
@@ -3,7 +3,7 @@ name: Ripes Tests
on:
push:
branches:
- - master
+ - '*'
pull_request:
jobs:
@@ -20,6 +20,7 @@ jobs:
submodules: recursive
# Container preparation
+ # Ubuntu
- if: contains( matrix.os, 'ubuntu')
name: Prepare ubuntu container for build
run: |
@@ -31,23 +32,46 @@ jobs:
echo "CC=gcc-9" >> $GITHUB_ENV
echo "CXX=g++-9" >> $GITHUB_ENV
-
+ # MacOS
- if: contains( matrix.os, 'macos')
name: Prepare macos container for build
run: brew install autoconf automake libtool xz pkg-config libgit2 libjpg libpng libmtp
+ # Windows
+ - if: contains( matrix.os, 'windows')
+ name: Prepare windows container for build
+ uses: ilammy/msvc-dev-cmd@v1
+ - if: contains( matrix.os, 'windows')
+ uses: seanmiddleditch/gha-setup-ninja@master
# Qt installation
- - name: install Qt
+ - if: "!contains(matrix.os, 'windows')"
+ name: install Qt
uses: jurplel/install-qt-action@v2
with:
version: '5.15.2'
modules: 'qtcharts qtsvg'
install-deps: false
+ - if: contains( matrix.os, 'windows')
+ name: install Qt (Windows)
+ uses: jurplel/install-qt-action@v2
+ with:
+ version: '5.15.2'
+ modules: 'qtcharts qtsvg'
+ install-deps: false
+ arch: win64_msvc2019_64
# Build ripes
- - name: build Ripes
+ - if: "!contains(matrix.os, 'windows')"
+ name: build Ripes
run: |
cmake -DCMAKE_BUILD_TYPE=Release .
make -j $(nproc)
+
+ - if: contains(matrix.os, 'windows')
+ name: build Ripes (Windows)
+ shell: bash
+ run: |
+ cmake -GNinja-DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl
+ cmake --build .

MODIFY
.github/workflows/windows-release.yml
.github/workflows/windows-release.yml
@@ -43,7 +43,7 @@ jobs:
- name: package artifacts
shell: bash
run: |
- source .github/scripts/set_version.sh
+ source .github/workflows/scripts/set_version.sh
APPNAME=Ripes-${RIPES_VERSION}-win-x86_64.zip
echo "APPNAME=${APPNAME}" >> $GITHUB_ENV
mkdir packageDir

Add windows to test.yml