Try to add CI that builds with CHATTERINO_HAVE_PLUGINS

This commit is contained in:
Mm2PL 2023-02-02 13:43:29 +01:00
parent c7f47df827
commit 67a6821cad
No known key found for this signature in database
GPG key ID: 94AC9B80EFA15ED9

View file

@ -24,11 +24,28 @@ jobs:
qt-version: [5.15.2, 5.12.12] qt-version: [5.15.2, 5.12.12]
pch: [true] pch: [true]
force-lto: [false] force-lto: [false]
plugins: [false]
include: include:
- os: ubuntu-20.04 - os: ubuntu-20.04
qt-version: 5.15.2 qt-version: 5.15.2
pch: false pch: false
force-lto: true force-lto: true
- os: ubuntu-20.04
qt-version: 5.15.2
pch: true
force-lto: false
plugins: true
- os: windows-latest
qt-version: 5.15.2
pch: true
force-lto: false
plugins: true
- os: macos-latest
qt-version: 5.15.2
pch: true
force-lto: false
plugins: true
fail-fast: false fail-fast: false
steps: steps:
@ -38,6 +55,12 @@ jobs:
echo "C2_ENABLE_LTO=ON" >> "$GITHUB_ENV" echo "C2_ENABLE_LTO=ON" >> "$GITHUB_ENV"
shell: bash shell: bash
- name: Enable plugin support
if: matrix.plugins == true
run: |
echo "C2_PLUGINS=ON" >> "$GITHUB_ENV"
shell: bash
- name: Set environment variables for windows-latest - name: Set environment variables for windows-latest
if: matrix.os == 'windows-latest' if: matrix.os == 'windows-latest'
run: | run: |
@ -102,6 +125,7 @@ jobs:
-DCMAKE_BUILD_TYPE=Release ` -DCMAKE_BUILD_TYPE=Release `
-DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" ` -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" `
-DCHATTERINO_LTO="$Env:C2_ENABLE_LTO" ` -DCHATTERINO_LTO="$Env:C2_ENABLE_LTO" `
-DCHATTERINO_PLUGINS="$Env:C2_PLUGINS" `
.. ..
set cl=/MP set cl=/MP
nmake /S /NOLOGO nmake /S /NOLOGO
@ -111,12 +135,19 @@ jobs:
7z a chatterino-windows-x86-64.zip Chatterino2/ 7z a chatterino-windows-x86-64.zip Chatterino2/
- name: Upload artifact (Windows) - name: Upload artifact (Windows)
if: startsWith(matrix.os, 'windows') if: startsWith(matrix.os, 'windows') && matrix.plugins == false
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: chatterino-windows-x86-64-${{ matrix.qt-version }}.zip name: chatterino-windows-x86-64-${{ matrix.qt-version }}.zip
path: build/chatterino-windows-x86-64.zip path: build/chatterino-windows-x86-64.zip
- name: Upload artifact (Windows, plugins)
if: startsWith(matrix.os, 'windows') && matrix.plugins == true
uses: actions/upload-artifact@v3
with:
name: chatterino-windows-x86-64-${{ matrix.qt-version }}-plugins.zip
path: build/chatterino-windows-x86-64.zip
- name: Clean Conan pkgs - name: Clean Conan pkgs
if: startsWith(matrix.os, 'windows') if: startsWith(matrix.os, 'windows')
run: conan remove "*" -fsb run: conan remove "*" -fsb
@ -160,6 +191,7 @@ jobs:
-DUSE_PRECOMPILED_HEADERS=${{ matrix.pch }} \ -DUSE_PRECOMPILED_HEADERS=${{ matrix.pch }} \
-DCMAKE_EXPORT_COMPILE_COMMANDS=On \ -DCMAKE_EXPORT_COMPILE_COMMANDS=On \
-DCHATTERINO_LTO="$C2_ENABLE_LTO" \ -DCHATTERINO_LTO="$C2_ENABLE_LTO" \
-DCHATTERINO_PLUGINS="$C2_PLUGINS" \
.. ..
make -j"$(nproc)" make -j"$(nproc)"
shell: bash shell: bash
@ -197,19 +229,33 @@ jobs:
shell: bash shell: bash
- name: Upload artifact - AppImage (Ubuntu) - name: Upload artifact - AppImage (Ubuntu)
if: startsWith(matrix.os, 'ubuntu') if: startsWith(matrix.os, 'ubuntu') && matrix.plugins == false
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: Chatterino-x86_64-${{ matrix.qt-version }}.AppImage name: Chatterino-x86_64-${{ matrix.qt-version }}.AppImage
path: build/Chatterino-x86_64.AppImage path: build/Chatterino-x86_64.AppImage
- name: Upload artifact - AppImage (Ubuntu, plugins)
if: startsWith(matrix.os, 'ubuntu') && matrix.plugins == true
uses: actions/upload-artifact@v3
with:
name: Chatterino-x86_64-${{ matrix.qt-version }}-plugins.AppImage
path: build/Chatterino-x86_64.AppImage
- name: Upload artifact - .deb (Ubuntu) - name: Upload artifact - .deb (Ubuntu)
if: startsWith(matrix.os, 'ubuntu') if: startsWith(matrix.os, 'ubuntu') && matrix.plugins == false
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: Chatterino-${{ matrix.qt-version }}.deb name: Chatterino-${{ matrix.qt-version }}.deb
path: build/Chatterino-x86_64.deb path: build/Chatterino-x86_64.deb
- name: Upload artifact - .deb (Ubuntu, plugins)
if: startsWith(matrix.os, 'ubuntu') && matrix.plugins == true
uses: actions/upload-artifact@v3
with:
name: Chatterino-${{ matrix.qt-version }}-plugins.deb
path: build/Chatterino-x86_64.deb
# MACOS # MACOS
- name: Install dependencies (MacOS) - name: Install dependencies (MacOS)
if: startsWith(matrix.os, 'macos') if: startsWith(matrix.os, 'macos')
@ -228,6 +274,7 @@ jobs:
-DOPENSSL_ROOT_DIR=/usr/local/opt/openssl \ -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl \
-DUSE_PRECOMPILED_HEADERS=${{ matrix.pch }} \ -DUSE_PRECOMPILED_HEADERS=${{ matrix.pch }} \
-DCHATTERINO_LTO="$C2_ENABLE_LTO" \ -DCHATTERINO_LTO="$C2_ENABLE_LTO" \
-DCHATTERINO_PLUGINS="$C2_PLUGINS" \
.. ..
make -j"$(sysctl -n hw.logicalcpu)" make -j"$(sysctl -n hw.logicalcpu)"
shell: bash shell: bash
@ -243,12 +290,18 @@ jobs:
shell: bash shell: bash
- name: Upload artifact (MacOS) - name: Upload artifact (MacOS)
if: startsWith(matrix.os, 'macos') if: startsWith(matrix.os, 'macos') && matrix.plugins == false
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: chatterino-osx-${{ matrix.qt-version }}.dmg name: chatterino-osx-${{ matrix.qt-version }}.dmg
path: build/chatterino-osx.dmg path: build/chatterino-osx.dmg
- name: Upload artifact (MacOS, plugins)
if: startsWith(matrix.os, 'macos') && matrix.plugins == true
uses: actions/upload-artifact@v3
with:
name: chatterino-osx-${{ matrix.qt-version }}.dmg
path: build/chatterino-osx.dmg
create-release: create-release:
needs: build needs: build
runs-on: ubuntu-latest runs-on: ubuntu-latest