mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-01-11 18:41:14 +00:00
ci: combine ci and release workflow (#453)
This commit is contained in:
parent
54694a4611
commit
daa0bd1a32
105
.github/workflows/ci.yml
vendored
105
.github/workflows/ci.yml
vendored
@ -33,14 +33,14 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- { name: 'Linux', os: 'ubuntu-latest', dx5: false, config: true, build-type: 'Debug', linux: true, werror: true, clang-tidy: true }
|
- { name: 'Linux', os: 'ubuntu-latest', dx5: false, config: true, linux: true, werror: true, clang-tidy: true }
|
||||||
- { name: 'MSVC (x86)', os: 'windows-latest', dx5: true, config: false, build-type: 'Debug', msvc: true, werror: false, clang-tidy: false, vc-arch: 'amd64_x86' }
|
- { name: 'MSVC (x86)', os: 'windows-latest', dx5: true, config: false, msvc: true, werror: false, clang-tidy: false, vc-arch: 'amd64_x86' }
|
||||||
- { name: 'MSVC (x64)', os: 'windows-latest', dx5: false, config: false, build-type: 'Debug', msvc: true, werror: false, clang-tidy: false, vc-arch: 'amd64' }
|
- { name: 'MSVC (x64)', os: 'windows-latest', dx5: false, config: false, msvc: true, werror: false, clang-tidy: false, vc-arch: 'amd64' }
|
||||||
- { name: 'MSVC (arm64)', os: 'windows-latest', dx5: false, config: false, build-type: 'Debug', msvc: true, werror: false, clang-tidy: false, vc-arch: 'amd64_arm64' }
|
- { name: 'MSVC (arm64)', os: 'windows-latest', dx5: false, config: false, msvc: true, werror: false, clang-tidy: false, vc-arch: 'amd64_arm64' }
|
||||||
- { name: 'msys2 mingw32', os: 'windows-latest', dx5: false, config: false, build-type: 'Debug', mingw: true, werror: true, clang-tidy: true, msystem: 'mingw32', msys-env: 'mingw-w64-i686', shell: 'msys2 {0}' }
|
- { name: 'msys2 mingw32', os: 'windows-latest', dx5: false, config: false, mingw: true, werror: true, clang-tidy: true, msystem: 'mingw32', msys-env: 'mingw-w64-i686', shell: 'msys2 {0}' }
|
||||||
- { name: 'msys2 mingw64', os: 'windows-latest', dx5: false, config: true, build-type: 'Debug', mingw: true, werror: true, clang-tidy: true, msystem: 'mingw64', msys-env: 'mingw-w64-x86_64', shell: 'msys2 {0}' }
|
- { name: 'msys2 mingw64', os: 'windows-latest', dx5: false, config: true, mingw: true, werror: true, clang-tidy: true, msystem: 'mingw64', msys-env: 'mingw-w64-x86_64', shell: 'msys2 {0}' }
|
||||||
- { name: 'macOS', os: 'macos-latest', dx5: false, config: true, build-type: 'Debug', brew: true, werror: true, clang-tidy: false }
|
- { name: 'macOS', os: 'macos-latest', dx5: false, config: true, brew: true, werror: true, clang-tidy: false }
|
||||||
- { name: 'Emscripten', os: 'ubuntu-latest', dx5: false, config: false, build-type: 'Debug', emsdk: true, werror: true, clang-tidy: false, cmake-wrapper: 'emcmake' }
|
- { name: 'Emscripten', os: 'ubuntu-latest', dx5: false, config: false, emsdk: true, werror: true, clang-tidy: false, cmake-wrapper: 'emcmake' }
|
||||||
steps:
|
steps:
|
||||||
- name: Setup vcvars
|
- name: Setup vcvars
|
||||||
if: ${{ !!matrix.msvc }}
|
if: ${{ !!matrix.msvc }}
|
||||||
@ -67,7 +67,7 @@ jobs:
|
|||||||
sudo apt-get install -y \
|
sudo apt-get install -y \
|
||||||
libx11-dev libxext-dev libxrandr-dev libxrender-dev libxfixes-dev libxi-dev libxinerama-dev \
|
libx11-dev libxext-dev libxrandr-dev libxrender-dev libxfixes-dev libxi-dev libxinerama-dev \
|
||||||
libxcursor-dev libwayland-dev libxkbcommon-dev wayland-protocols libgl1-mesa-dev qt6-base-dev \
|
libxcursor-dev libwayland-dev libxkbcommon-dev wayland-protocols libgl1-mesa-dev qt6-base-dev \
|
||||||
libasound2-dev
|
libasound2-dev qt6-xdgdesktopportal-platformtheme
|
||||||
|
|
||||||
- name: Install macOS dependencies (brew)
|
- name: Install macOS dependencies (brew)
|
||||||
if: ${{ matrix.brew }}
|
if: ${{ matrix.brew }}
|
||||||
@ -89,11 +89,12 @@ jobs:
|
|||||||
- name: Configure (CMake)
|
- name: Configure (CMake)
|
||||||
run: |
|
run: |
|
||||||
${{ matrix.cmake-wrapper || '' }} cmake -S . -B build -GNinja \
|
${{ matrix.cmake-wrapper || '' }} cmake -S . -B build -GNinja \
|
||||||
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-DISLE_USE_DX5=${{ !!matrix.dx5 }} \
|
-DISLE_USE_DX5=${{ !!matrix.dx5 }} \
|
||||||
-DISLE_BUILD_CONFIG=${{ matrix.config }} \
|
-DISLE_BUILD_CONFIG=${{ matrix.config }} \
|
||||||
-DENABLE_CLANG_TIDY=${{ !!matrix.clang-tidy }} \
|
-DENABLE_CLANG_TIDY=${{ !!matrix.clang-tidy }} \
|
||||||
-DISLE_WERROR=${{ !!matrix.werror }} \
|
-DISLE_WERROR=${{ !!matrix.werror }} \
|
||||||
|
-DISLE_DEBUG=OFF \
|
||||||
-Werror=dev
|
-Werror=dev
|
||||||
|
|
||||||
- name: Build (CMake)
|
- name: Build (CMake)
|
||||||
@ -104,11 +105,64 @@ jobs:
|
|||||||
cd build
|
cd build
|
||||||
cpack .
|
cpack .
|
||||||
|
|
||||||
|
- name: Install linuxdeploy
|
||||||
|
if: ${{ matrix.linux }}
|
||||||
|
id: install-linuxdeploy
|
||||||
|
uses: miurahr/install-linuxdeploy-action@v1.8.0
|
||||||
|
with:
|
||||||
|
plugins: qt appimage
|
||||||
|
|
||||||
|
- name: Package (AppImage)
|
||||||
|
if: ${{ matrix.linux }}
|
||||||
|
run: |
|
||||||
|
cd build && \
|
||||||
|
export LD_LIBRARY_PATH=".:$LD_LIBRARY_PATH" && \
|
||||||
|
NO_STRIP=1 ${{ steps.install-linuxdeploy.outputs.linuxdeploy }} \
|
||||||
|
-p qt \
|
||||||
|
-e isle \
|
||||||
|
-e isle-config \
|
||||||
|
-d packaging/linux/org.legoisland.Isle.desktop \
|
||||||
|
-i icons/org.legoisland.Isle.svg \
|
||||||
|
--custom-apprun=../packaging/linux/appimage/AppRun \
|
||||||
|
--appdir packaging/linux/appimage/AppDir \
|
||||||
|
--output appimage && \
|
||||||
|
mv *.AppImage dist/
|
||||||
|
|
||||||
- name: Upload Build Artifacts
|
- name: Upload Build Artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: '${{ matrix.name }} ${{ matrix.build-type }}'
|
name: '${{ matrix.name }}'
|
||||||
path: build/dist/isle-*
|
path: |
|
||||||
|
build/dist/isle-*
|
||||||
|
build/dist/*.AppImage
|
||||||
|
|
||||||
|
flatpak:
|
||||||
|
name: "Flatpak (${{ matrix.arch }})"
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- arch: x86_64
|
||||||
|
os: ubuntu-latest
|
||||||
|
|
||||||
|
- arch: aarch64
|
||||||
|
os: ubuntu-22.04-arm
|
||||||
|
|
||||||
|
container:
|
||||||
|
image: ghcr.io/flathub-infra/flatpak-github-actions:kde-6.8
|
||||||
|
options: --privileged
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Build Flatpak
|
||||||
|
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
|
||||||
|
with:
|
||||||
|
bundle: org.legoisland.Isle.${{ matrix.arch }}.flatpak
|
||||||
|
manifest-path: packaging/linux/flatpak/org.legoisland.Isle.json
|
||||||
|
arch: ${{ matrix.arch }}
|
||||||
|
|
||||||
ncc:
|
ncc:
|
||||||
name: 'C++'
|
name: 'C++'
|
||||||
@ -148,3 +202,30 @@ jobs:
|
|||||||
LEGO1/omni/src/video/flic.cpp \
|
LEGO1/omni/src/video/flic.cpp \
|
||||||
$action_headers \
|
$action_headers \
|
||||||
--path LEGO1/omni LEGO1/lego/legoomni
|
--path LEGO1/omni LEGO1/lego/legoomni
|
||||||
|
|
||||||
|
release:
|
||||||
|
name: 'Release'
|
||||||
|
if: ${{ github.event_name == 'push' && github.ref_name == 'master' }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs:
|
||||||
|
- build
|
||||||
|
- flatpak
|
||||||
|
steps:
|
||||||
|
- name: Download All Artifacts
|
||||||
|
uses: actions/download-artifact@main
|
||||||
|
with:
|
||||||
|
pattern: "{Release-*,*.flatpak}"
|
||||||
|
path: Release
|
||||||
|
merge-multiple: true
|
||||||
|
|
||||||
|
- name: Checkout uploadtool
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: 'probonopd/uploadtool'
|
||||||
|
path: 'uploadtool'
|
||||||
|
|
||||||
|
- name: Upload Continuous Release
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: |
|
||||||
|
./uploadtool/upload.sh Release/*
|
||||||
|
|||||||
170
.github/workflows/release.yml
vendored
170
.github/workflows/release.yml
vendored
@ -1,170 +0,0 @@
|
|||||||
name: Release
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: ${{ matrix.name }}
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: ${{ matrix.shell || 'sh' }}
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- { name: 'Linux', os: 'ubuntu-latest', dx5: false, config: true, build-type: 'Release', linux: true, werror: true, clang-tidy: false }
|
|
||||||
- { name: 'Windows', os: 'windows-latest', dx5: false, config: false, build-type: 'Release', msvc: true, werror: false, clang-tidy: false, vc-arch: 'amd64' }
|
|
||||||
- { name: 'macOS', os: 'macos-latest', dx5: false, config: true, build-type: 'Release', brew: true, werror: true, clang-tidy: false }
|
|
||||||
steps:
|
|
||||||
- name: Setup vcvars
|
|
||||||
if: ${{ !!matrix.msvc }}
|
|
||||||
uses: ilammy/msvc-dev-cmd@v1
|
|
||||||
with:
|
|
||||||
arch: ${{ matrix.vc-arch }}
|
|
||||||
|
|
||||||
- name: Set up MSYS2
|
|
||||||
if: ${{ !!matrix.msystem }}
|
|
||||||
uses: msys2/setup-msys2@v2
|
|
||||||
with:
|
|
||||||
msystem: ${{ matrix.msystem }}
|
|
||||||
install: >-
|
|
||||||
${{ matrix.msys-env }}-cc
|
|
||||||
${{ matrix.msys-env }}-cmake
|
|
||||||
${{ matrix.msys-env }}-ninja
|
|
||||||
${{ matrix.msys-env }}-clang-tools-extra
|
|
||||||
${{ (matrix.config && format('{0}-qt6-base', matrix.msys-env)) || '' }}
|
|
||||||
|
|
||||||
- name: Install Linux dependencies (apt-get)
|
|
||||||
if: ${{ matrix.linux }}
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y \
|
|
||||||
libx11-dev libxext-dev libxrandr-dev libxrender-dev libxfixes-dev libxi-dev libxinerama-dev \
|
|
||||||
libxcursor-dev libwayland-dev libxkbcommon-dev wayland-protocols libgl1-mesa-dev qt6-base-dev \
|
|
||||||
libasound2-dev qt6-xdgdesktopportal-platformtheme
|
|
||||||
|
|
||||||
- name: Install macOS dependencies (brew)
|
|
||||||
if: ${{ matrix.brew }}
|
|
||||||
run: |
|
|
||||||
brew update
|
|
||||||
brew install cmake ninja llvm qt6
|
|
||||||
echo "LLVM_ROOT=$(brew --prefix llvm)/bin" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Setup Emscripten
|
|
||||||
uses: mymindstorm/setup-emsdk@master
|
|
||||||
if: ${{ matrix.emsdk }}
|
|
||||||
|
|
||||||
- name: Setup ninja
|
|
||||||
if: ${{ matrix.msvc }}
|
|
||||||
uses: ashutoshvarma/setup-ninja@master
|
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Configure (CMake)
|
|
||||||
run: |
|
|
||||||
${{ matrix.cmake-wrapper || '' }} cmake -S . -B build -GNinja \
|
|
||||||
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \
|
|
||||||
-DISLE_USE_DX5=${{ !!matrix.dx5 }} \
|
|
||||||
-DISLE_BUILD_CONFIG=${{ matrix.config }} \
|
|
||||||
-DENABLE_CLANG_TIDY=${{ !!matrix.clang-tidy }} \
|
|
||||||
-DISLE_WERROR=${{ !!matrix.werror }} \
|
|
||||||
-DISLE_DEBUG=OFF \
|
|
||||||
-Werror=dev
|
|
||||||
|
|
||||||
- name: Build (CMake)
|
|
||||||
run: cmake --build build --verbose
|
|
||||||
|
|
||||||
- name: Package (CPack)
|
|
||||||
run: |
|
|
||||||
cd build
|
|
||||||
cpack .
|
|
||||||
|
|
||||||
- name: Install linuxdeploy
|
|
||||||
if: ${{ matrix.linux }}
|
|
||||||
id: install-linuxdeploy
|
|
||||||
uses: miurahr/install-linuxdeploy-action@v1.8.0
|
|
||||||
with:
|
|
||||||
plugins: qt appimage
|
|
||||||
|
|
||||||
- name: Package (AppImage)
|
|
||||||
if: ${{ matrix.linux }}
|
|
||||||
run: |
|
|
||||||
cd build && \
|
|
||||||
export LD_LIBRARY_PATH=".:$LD_LIBRARY_PATH" && \
|
|
||||||
NO_STRIP=1 ${{ steps.install-linuxdeploy.outputs.linuxdeploy }} \
|
|
||||||
-p qt \
|
|
||||||
-e isle \
|
|
||||||
-e isle-config \
|
|
||||||
-d packaging/linux/org.legoisland.Isle.desktop \
|
|
||||||
-i icons/org.legoisland.Isle.svg \
|
|
||||||
--custom-apprun=../packaging/linux/appimage/AppRun \
|
|
||||||
--appdir packaging/linux/appimage/AppDir \
|
|
||||||
--output appimage && \
|
|
||||||
mv *.AppImage dist/
|
|
||||||
|
|
||||||
- name: Upload Artifact
|
|
||||||
uses: actions/upload-artifact@main
|
|
||||||
with:
|
|
||||||
name: Release-${{ matrix.name }}
|
|
||||||
path: |
|
|
||||||
build/dist/isle-*
|
|
||||||
build/dist/*.AppImage
|
|
||||||
|
|
||||||
flatpak:
|
|
||||||
name: "Flatpak (${{ matrix.arch }})"
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- arch: x86_64
|
|
||||||
os: ubuntu-latest
|
|
||||||
|
|
||||||
- arch: aarch64
|
|
||||||
os: ubuntu-22.04-arm
|
|
||||||
|
|
||||||
container:
|
|
||||||
image: ghcr.io/flathub-infra/flatpak-github-actions:kde-6.8
|
|
||||||
options: --privileged
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Build Flatpak
|
|
||||||
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
|
|
||||||
with:
|
|
||||||
bundle: org.legoisland.Isle.${{ matrix.arch }}.flatpak
|
|
||||||
manifest-path: packaging/linux/flatpak/org.legoisland.Isle.json
|
|
||||||
arch: ${{ matrix.arch }}
|
|
||||||
|
|
||||||
release:
|
|
||||||
name: 'Release'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs:
|
|
||||||
- build
|
|
||||||
- flatpak
|
|
||||||
steps:
|
|
||||||
- name: Download All Artifacts
|
|
||||||
uses: actions/download-artifact@main
|
|
||||||
with:
|
|
||||||
pattern: "{Release-*,*.flatpak}"
|
|
||||||
path: Release
|
|
||||||
merge-multiple: true
|
|
||||||
|
|
||||||
- name: Checkout uploadtool
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
repository: 'probonopd/uploadtool'
|
|
||||||
path: 'uploadtool'
|
|
||||||
|
|
||||||
- name: Upload Continuous Release
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
run: |
|
|
||||||
./uploadtool/upload.sh Release/*
|
|
||||||
Loading…
Reference in New Issue
Block a user