-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from scharlton2/develop
Merge _develop-qt-refactor
- Loading branch information
Showing
416 changed files
with
23,632 additions
and
26,741 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,292 @@ | ||
name: build-qt5-vtk | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
- 'develop' | ||
- '_develop-*' | ||
pull_request: | ||
branches: | ||
- 'main' | ||
- 'develop' | ||
- '_develop-*' | ||
|
||
workflow_dispatch: | ||
|
||
env: | ||
AQT_TARGET: desktop | ||
AQT_VER: 5.15.2 | ||
VTK_VER: 9.1.0 | ||
|
||
# ${{ env.RUNNER_WORKSPACE }} doesn't seem to work on linux and macos | ||
# but ${RUNNER_WORKSPACE} is set in the environment for all os | ||
# therefore use ${{ runner.workspace }} instead of ${{ env.RUNNER_WORKSPACE }} | ||
|
||
jobs: | ||
cache-qt5-vtk: | ||
name: ${{ matrix.config.name }} | ||
runs-on: ${{ matrix.config.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- { | ||
name: "macos-11-debug", | ||
os: macos-11, | ||
cmake_config: Debug, | ||
aqt_host: mac, | ||
aqt_arch: clang_64 | ||
} | ||
- { | ||
name: "ubuntu-20.04-debug", | ||
os: ubuntu-20.04, | ||
cmake_config: Debug, | ||
aqt_host: linux, | ||
aqt_arch: gcc_64 | ||
} | ||
- { | ||
name: "windows-2019-debug", | ||
os: windows-2019, | ||
cmake_config: Debug, | ||
aqt_host: windows, | ||
aqt_arch: win64_msvc2019_64 | ||
} | ||
- { | ||
name: "macos-11-release", | ||
os: macos-11, | ||
cmake_config: Release, | ||
aqt_host: mac, | ||
aqt_arch: clang_64 | ||
} | ||
- { | ||
name: "ubuntu-20.04-release", | ||
os: ubuntu-20.04, | ||
cmake_config: Release, | ||
aqt_host: linux, | ||
aqt_arch: gcc_64 | ||
} | ||
- { | ||
name: "windows-2019-release", | ||
os: windows-2019, | ||
cmake_config: Release, | ||
aqt_host: windows, | ||
aqt_arch: win64_msvc2019_64 | ||
} | ||
- { | ||
name: "macos-12-debug", | ||
os: macos-12, | ||
cmake_config: Debug, | ||
aqt_host: mac, | ||
aqt_arch: clang_64 | ||
} | ||
- { | ||
name: "ubuntu-22.04-debug", | ||
os: ubuntu-22.04, | ||
cmake_config: Debug, | ||
aqt_host: linux, | ||
aqt_arch: gcc_64 | ||
} | ||
- { | ||
name: "windows-2022-debug", | ||
os: windows-2022, | ||
cmake_config: Debug, | ||
aqt_host: windows, | ||
aqt_arch: win64_msvc2019_64 | ||
} | ||
- { | ||
name: "macos-12-release", | ||
os: macos-12, | ||
cmake_config: Release, | ||
aqt_host: mac, | ||
aqt_arch: clang_64 | ||
} | ||
- { | ||
name: "ubuntu-22.04-release", | ||
os: ubuntu-22.04, | ||
cmake_config: Release, | ||
aqt_host: linux, | ||
aqt_arch: gcc_64 | ||
} | ||
- { | ||
name: "windows-2022-release", | ||
os: windows-2022, | ||
cmake_config: Release, | ||
aqt_host: windows, | ||
aqt_arch: win64_msvc2019_64 | ||
} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install Qt | ||
uses: jurplel/install-qt-action@v3 | ||
with: | ||
version: ${{ env.AQT_VER }} | ||
host: ${{ matrix.config.aqt_host }} | ||
target: ${{ env.AQT_TARGET }} | ||
arch: ${{ matrix.config.aqt_arch }} | ||
dir: ${{ runner.workspace }} | ||
cache: true | ||
cache-key-prefix: install-qt-action | ||
tools: tools_ninja | ||
|
||
- name: Add ninja path | ||
shell: bash | ||
run: | | ||
echo "${IQTA_TOOLS}/Ninja" >> $GITHUB_PATH | ||
- name: Set up Visual Studio shell | ||
if: runner.os == 'Windows' | ||
uses: egor-tensin/vs-shell@v2 | ||
with: | ||
arch: x64 | ||
|
||
- name: Cache qt5-vtk | ||
id: cache-qt5-vtk | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ runner.workspace }}/qt5-vtk-${{ env.VTK_VER }} | ||
key: ${{ matrix.config.os }}-qt5-vtk-${{ matrix.config.cmake_config }}-${{ hashFiles('misc/CMakePresets-vtk-9.1.0-qt-5.15.2.json') }} | ||
|
||
- name: Build qt5-vtk | ||
if: steps.cache-qt5-vtk.outputs.cache-hit != 'true' | ||
run: | | ||
cd ${{ runner.workspace }} | ||
curl -L -O https://github.com/Kitware/VTK/archive/refs/tags/v${{ env.VTK_VER }}.tar.gz | ||
tar xzf ./v${{ env.VTK_VER }}.tar.gz | ||
cp ./modelviewer-mf6/misc/CMakePresets-vtk-9.1.0-qt-5.15.2.json ./VTK-${{ env.VTK_VER }}/CMakePresets.json | ||
cd ./VTK-${{ env.VTK_VER }}/. | ||
cmake --preset ${{ matrix.config.aqt_arch }} | ||
cmake --build --preset ${{ matrix.config.aqt_arch }} --config ${{ matrix.config.cmake_config }} | ||
cmake --install ${{ runner.workspace }}/qt5-vtk-${{ env.VTK_VER }}-build --config ${{ matrix.config.cmake_config }} | ||
build: | ||
name: ${{ matrix.config.os }} | ||
runs-on: ${{ matrix.config.os }} | ||
needs: [cache-qt5-vtk] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- { | ||
os: macos-11, | ||
aqt_host: mac, | ||
aqt_arch: clang_64, | ||
package_suffix: "dmg" | ||
} | ||
- { | ||
os: macos-12, | ||
aqt_host: mac, | ||
aqt_arch: clang_64, | ||
package_suffix: "dmg" | ||
} | ||
- { | ||
os: ubuntu-20.04, | ||
aqt_host: linux, | ||
aqt_arch: gcc_64, | ||
package_suffix: "gz" | ||
} | ||
- { | ||
os: ubuntu-22.04, | ||
aqt_host: linux, | ||
aqt_arch: gcc_64, | ||
package_suffix: "gz" | ||
} | ||
- { | ||
os: windows-2019, | ||
aqt_host: windows, | ||
aqt_arch: win64_msvc2019_64, | ||
package_suffix: "zip" | ||
} | ||
- { | ||
os: windows-2022, | ||
aqt_host: windows, | ||
aqt_arch: win64_msvc2019_64, | ||
package_suffix: "zip" | ||
} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
# | ||
# Open 'PowerShell 7 for VS 2019 x64' in Windows Terminal | ||
# | ||
# see https://ddalcino.github.io/aqt-list-server/ | ||
# aqt install-qt mac desktop 5.15.2 clang_64 --dir ${HOME}/work/modelviewer-mf6/Qt | ||
# aqt install-qt linux desktop 5.15.2 gcc_64 --dir ${HOME}/work/modelviewer-mf6/Qt | ||
# aqt install-qt windows desktop 5.15.2 win64_msvc2019_64 --dir ${env:USERPROFILE}\work\modelviewer-mf6\Qt | ||
# | ||
- name: Install Qt | ||
uses: jurplel/install-qt-action@v3 | ||
with: | ||
version: ${{ env.AQT_VER }} | ||
host: ${{ matrix.config.aqt_host }} | ||
target: ${{ env.AQT_TARGET }} | ||
arch: ${{ matrix.config.aqt_arch }} | ||
dir: ${{ runner.workspace }} | ||
cache: true | ||
cache-key-prefix: install-qt-action | ||
tools: tools_ninja | ||
|
||
- name: Add ninja path | ||
shell: bash | ||
run: | | ||
echo "${IQTA_TOOLS}/Ninja" >> $GITHUB_PATH | ||
- name: Cache qt5-vtk debug | ||
id: cache-qt5-vtk-debug | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ runner.workspace }}/qt5-vtk-${{ env.VTK_VER }} | ||
key: ${{ matrix.config.os }}-qt5-vtk-Debug-${{ hashFiles('misc/CMakePresets-vtk-9.1.0-qt-5.15.2.json') }} | ||
|
||
- name: Cache qt5-vtk release | ||
id: cache-qt5-vtk-release | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ runner.workspace }}/qt5-vtk-${{ env.VTK_VER }} | ||
key: ${{ matrix.config.os }}-qt5-vtk-Release-${{ hashFiles('misc/CMakePresets-vtk-9.1.0-qt-5.15.2.json') }} | ||
|
||
- name: Set env vars | ||
shell: bash | ||
run: | | ||
echo "MV_SHORT_SHA1=$(git rev-parse --short HEAD)" >> $GITHUB_ENV | ||
echo "MV_DATE_COMPILED=$(date --rfc-3339=date) (compiled $(date "+%b %d %Y %H:%M:%S"))" >> $GITHUB_ENV | ||
# the shell needs to be set to use ninja on windows | ||
- name: Set up Visual Studio shell | ||
if: runner.os == 'Windows' | ||
uses: egor-tensin/vs-shell@v2 | ||
with: | ||
arch: x64 | ||
|
||
- name: "*** Configure modelviewer-mf6 for release ***" | ||
if: ${{ github.ref_name == 'master' }} | ||
env: | ||
VTK_DIR: ${{ runner.workspace }}/qt5-vtk-${{ env.VTK_VER }}/lib/cmake | ||
run: cmake -S . -B ./_ninja_multi -G "Ninja Multi-Config" -DMV_SHORT_SHA1="${{ env.MV_SHORT_SHA1 }}" -DMV_DATE_COMPILED="${{ env.MV_DATE_COMPILED }}" | ||
|
||
- name: "*** Configure modelviewer-mf6 for prerelease ***" | ||
if: ${{ github.ref_name != 'master' }} | ||
env: | ||
VTK_DIR: ${{ runner.workspace }}/qt5-vtk-${{ env.VTK_VER }}/lib/cmake | ||
MV_VERSION_PRERELEASE: -prerelease.${{ github.run_number }} | ||
run: cmake -S . -B ./_ninja_multi -G "Ninja Multi-Config" -DMV_SHORT_SHA1="${{ env.MV_SHORT_SHA1 }}" -DMV_DATE_COMPILED="${{ env.MV_DATE_COMPILED }}" -DMV_VERSION_PRERELEASE="${{ env.MV_VERSION_PRERELEASE }}" | ||
|
||
- name: "*** Build modelviewer-mf6 debug with cmake ***" | ||
run: cmake --build ./_ninja_multi --config Debug | ||
|
||
- name: "*** Build modelviewer-mf6 release with cmake ***" | ||
run: cmake --build ./_ninja_multi --config Release | ||
|
||
- name: "*** Package modelviewer-mf6 release with cpack ***" | ||
working-directory: ./_ninja_multi | ||
run: cpack --verbose | ||
|
||
- name: "*** Upload package ***" | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ matrix.config.os }}-artifact | ||
path: ${{ github.workspace }}/_ninja_multi/*.${{ matrix.config.package_suffix }} |
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
Oops, something went wrong.