Skip to content

Commit

Permalink
Fix pipeline
Browse files Browse the repository at this point in the history
fix win tests/deploy
disable macOS
bump all versions in pipeline
  • Loading branch information
sgsaenger committed Aug 12, 2023
1 parent abc1875 commit f9814ee
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 62 deletions.
88 changes: 39 additions & 49 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,24 @@ jobs:
name: 'Test & Debug (Linux)'
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true

- name: Cache Qt
id: cache-qt
uses: actions/cache@v1
with:
path: ../Qt
key: ${{ runner.os }}-QtCache-6.4.0
- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
version: '6.4.0'
target: 'desktop'
cached: ${{ steps.cache-qt.outputs.cache-hit }}
- name: Setup Ninja
uses: seanmiddleditch/gha-setup-ninja@master

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Setup Ninja
uses: seanmiddleditch/gha-setup-ninja@master
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: '6.4.0'
target: 'desktop'
cached: true

- name: Install dependencies
run: |
Expand Down Expand Up @@ -72,48 +66,45 @@ jobs:
- os: ubuntu-20.04
script: make-appimage.sh
artifact: Vipster-Linux-x86_64.AppImage
qt_arch: gcc_64
- os: windows-latest
script: make-win-archive.sh
artifact: Vipster-Win-x86_64.zip
- os: macOS-latest
script: make-macos-app.sh
artifact: Vipster-macOS-x86_64.dmg
qt_arch: win64_mingw
#- os: macOS-latest
# script: make-macos-app.sh
# artifact: Vipster-macOS-x86_64.dmg
# qt_arch: clang_64
needs: debug
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true

- name: Cache Qt
id: cache-qt
uses: actions/cache@v2
with:
path: Qt
key: ${{ runner.os }}-QtCache-6.4.0
- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
version: '6.4.0'
target: 'desktop'
arch: 'win64_mingw'
dir: ${{ github.workspace }}
cached: ${{ steps.cache-qt.outputs.cache-hit }}
- name: Setup Ninja
uses: seanmiddleditch/gha-setup-ninja@master

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Add Python libraries
shell: bash
run: pip install numpy moltemplate

- name: Setup Ninja
uses: seanmiddleditch/gha-setup-ninja@master
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: '6.4.0'
target: 'desktop'
arch: ${{ matrix.qt_arch }}
dir: ${{ github.workspace }}
cached: true

- name: Cache MinGW
if: runner.os == 'Windows'
id: cache-mingw
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: MinGW
key: mingw-18.0
Expand All @@ -131,7 +122,6 @@ jobs:
run: |
echo $GITHUB_WORKSPACE/MinGW/bin >> $GITHUB_PATH
echo CMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/MinGW:$CMAKE_PREFIX_PATH >> $GITHUB_ENV
#echo CMAKE_GENERATOR="MSYS Makefiles" >> $GITHUB_ENV
- name: Configure Linux
if: runner.os == 'Linux'
Expand Down Expand Up @@ -161,7 +151,7 @@ jobs:
. ../util/${{ matrix.script }}
- name: Upload artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: Vipster-${{ runner.os }}
path: build/${{ matrix.artifact }}
Expand All @@ -171,11 +161,11 @@ jobs:
runs-on: ubuntu-latest
needs: debug
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true

- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: '3.10'

Expand All @@ -192,7 +182,7 @@ jobs:
echo "ARTIFACT=$ARTIFACT" >> $GITHUB_ENV
- name: Upload artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: Vipster-Web
path: ${{ env.ARTIFACT }}
Expand All @@ -204,22 +194,22 @@ jobs:
strategy:
matrix:
os: [windows-latest, ubuntu-20.04]
python-version: ['3.7', '3.8', '3.9', '3.10']
python-version: ['3.8', '3.9', '3.10', '3.11']
include:
- os: windows-latest
wheeldir: dist
- os: ubuntu-20.04
wheeldir: wheelhouse

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true

- name: Cache MinGW
if: runner.os == 'Windows'
id: cache-mingw
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: MinGW
key: mingw-18.0
Expand All @@ -240,7 +230,7 @@ jobs:
echo CMAKE_GENERATOR="MSYS Makefiles" >> $GITHUB_ENV
- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -254,11 +244,11 @@ jobs:
if: runner.os == 'Linux'
shell: bash
run: |
pip install auditwheel
pip install auditwheel==5.1.2
auditwheel repair dist/*.whl --plat manylinux_2_31_x86_64
- name: Upload artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: Vipster-PyWheel-${{ runner.os }}
path: ${{ matrix.wheeldir }}/*.whl
1 change: 1 addition & 0 deletions tests/unit_tests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ FetchContent_MakeAvailable(Catch2)
target_link_libraries(test_lib PRIVATE libvipster Catch2::Catch2)

add_test(NAME test_lib COMMAND $<TARGET_FILE:test_lib>)
set_property(TEST test_lib PROPERTY ENVIRONMENT_MODIFICATION "PATH=path_list_prepend:${CMAKE_BINARY_DIR}/vipster")
8 changes: 4 additions & 4 deletions util/make-macos-app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# create a dmg file from a pre-built tree

echo "creating .dmg"
mkdir -p vipster.app/Contents/Frameworks
cp -a gui/qt/vipster.framework vipster.app/Contents/Frameworks
mkdir -p gui/qt/vipster.app/Contents/Frameworks
cp -a vipster/vipster.framework gui/qt/vipster.app/Contents/Frameworks
# fix rpath
export VIPVER=$(grep "CMAKE_PROJECT_VERSION:" ../CMakeLists.txt | cut -d "=" -f 2)
install_name_tool -change @rpath/vipster.framework/Versions/$VIPVER/vipster @executable_path/../Frameworks/vipster.framework/Versions/$VIPVER/vipster vipster.app/Contents/MacOS/vipster
install_name_tool -change @rpath/vipster.framework/Versions/$VIPVER/vipster @executable_path/../Frameworks/vipster.framework/Versions/$VIPVER/vipster gui/qt/vipster.app/Contents/MacOS/vipster
# create .dmg file
macdeployqt vipster.app -dmg
macdeployqt gui/qt/vipster.app -dmg
mv vipster.dmg Vipster-macOS-x86_64.dmg
23 changes: 14 additions & 9 deletions util/make-win-archive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,24 @@
# create a zip file from a pre-built tree

echo "creating zip-Archive"
mkdir Vipster
TMPDIR=deploy
mkdir ${TMPDIR}

# Vipster itself
cp vipster.exe Vipster
cp libvipster.dll Vipster
echo "Copying vipster"
cp gui/qt/vipster.exe ${TMPDIR}
cp vipster/libvipster.dll ${TMPDIR}

# copy the local python installation
PY_LIB=$(grep "Python3_LIBRARY_RELEASE" CMakeCache.txt | cut -d "=" -f 2)
cp $PY_LIB Vipster
cp -r $pythonLocation/Lib $pythonLocation/DLLs Vipster
echo "Obtain python"
PY_LIB=$(grep "Python_LIBRARY_RELEASE" CMakeCache.txt | cut -d "=" -f 2)
cp $PY_LIB ${TMPDIR}
cp -r $pythonLocation/Lib $pythonLocation/DLLs ${TMPDIR}

# prepare Qt and other libraries
windeployqt --compiler-runtime --no-translations Vipster/vipster.exe
cp $Qt5_Dir/bin/lib{gcc_s_seh-1,stdc++-6,winpthread-1}.dll Vipster
echo "Run windeployqt"
windeployqt --compiler-runtime --no-translations ${TMPDIR}/vipster.exe
cp $Qt6_DIR/bin/lib{gcc_s_seh-1,stdc++-6,winpthread-1}.dll deploy

7z a Vipster-Win-x86_64.zip Vipster
echo "Create zip archive"
7z a Vipster-Win-x86_64.zip ${TMPDIR}/*

0 comments on commit f9814ee

Please sign in to comment.