use spatial-model-editor/setup-ci@v1 #159
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: Release Builds | |
on: push | |
env: | |
QT_VERSION: "v6.6.2" | |
ZLIB_VERSION: "v1.3.1" # not used for msvc builds | |
jobs: | |
linux: | |
name: Linux | |
runs-on: ubuntu-20.04 | |
env: | |
CONFIGURE_EXTRAS: "-DFEATURE_xcb=ON -DINPUT_bundled_xcb_xinput=yes -DFEATURE_libudev=OFF" | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: spatial-model-editor/setup-ci@v1 | |
with: | |
extra-deps: "libglu1-mesa-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev libxkbcommon-dev libxkbcommon-x11-dev '^libxcb.*-dev'" | |
- uses: actions/checkout@v4 | |
- name: Build script | |
run: ./build.sh | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: artifacts-linux | |
path: ./artefacts/* | |
macos: | |
name: MacOS | |
runs-on: macos-13 | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: spatial-model-editor/setup-ci@v1 | |
- uses: actions/checkout@v4 | |
- name: Build script | |
run: ./build.sh | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: artifacts-macos | |
path: ./artefacts/* | |
win64-mingw: | |
name: Windows 64-bit Mingw | |
runs-on: windows-2022 | |
env: | |
CONFIGURE_EXTRAS: "-DQT_QMAKE_TARGET_MKSPEC=win32-g++" | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
- uses: spatial-model-editor/setup-ci@v1 | |
- uses: actions/checkout@v4 | |
- name: Build script | |
run: ./build.sh | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: artifacts-win64-mingw | |
path: ./artefacts/* | |
win32-mingw: | |
name: Windows 32-bit Mingw | |
runs-on: windows-2022 | |
env: | |
INSTALL_PREFIX: "/c/smelibs" | |
SUDO_CMD: "" | |
CONFIGURE_EXTRAS: "-DQT_QMAKE_TARGET_MKSPEC=win32-g++" | |
OS: "win32-mingw" | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: msys2/setup-msys2@v2 | |
with: | |
msystem: MINGW32 | |
update: true | |
install: mingw-w64-i686-gcc mingw-w64-i686-cmake mingw-w64-i686-ninja git | |
- name: Build script | |
run: ./build.sh | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: artifacts-win32-mingw | |
path: ./artefacts/* | |
win64-msvc: | |
name: Windows 64-bit MSVC | |
runs-on: windows-2022 | |
env: | |
INSTALL_PREFIX: 'C:\smelibs' | |
OS: "win64-msvc" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: amd64 | |
toolset: 14.0 | |
- name: Build script | |
run: ./build.ps1 | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: artifacts-win64-msvc | |
path: ./artefacts/* | |
win32-msvc: | |
name: Windows 32-bit MSVC | |
runs-on: windows-2022 | |
env: | |
INSTALL_PREFIX: 'C:\smelibs' | |
OS: "win32-msvc" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: amd64_x86 | |
toolset: 14.0 | |
- name: Build script | |
run: ./build.ps1 | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: artifacts-win32-msvc | |
path: ./artefacts/* | |
release: | |
needs: [linux, macos, win64-mingw, win32-mingw, win64-msvc, win32-msvc] | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
# upload binaries to github release if commit is tagged | |
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/') | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
pattern: artifacts-* | |
merge-multiple: true | |
path: binaries | |
- name: Upload binaries to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: binaries/* | |
tag: ${{ github.ref }} | |
overwrite: true | |
file_glob: true |