Clean up CI jobs (#4606)

Remove PCH as an option - it's now always disabled for all jobs

Disable LTO in the Windows build

Merge the Ubuntu Qt 6.2.4 & Ubuntu plugin build

Only upload a single macOS job into the nightly release, and clearly mark it as a macOS 10.15 build.
This commit is contained in:
pajlada 2023-05-08 14:08:43 +02:00 committed by GitHub
parent 68f14d3425
commit eed2cfff5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 53 additions and 50 deletions

View file

@ -22,65 +22,68 @@ env:
jobs: jobs:
build: build:
name: "Build ${{ matrix.os }}, Qt ${{ matrix.qt-version }} (PCH:${{ matrix.pch }}, LTO:${{ matrix.force-lto }})" name: "Build ${{ matrix.os }}, Qt ${{ matrix.qt-version }} (LTO:${{ matrix.force-lto }}, crashpad:${{ matrix.skip-crashpad && 'off' || 'on' }})"
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
os: [windows-latest, macos-latest] os: [windows-latest, macos-latest]
qt-version: [5.15.2, 6.5.0] qt-version: [5.15.2, 6.5.0]
pch: [true]
force-lto: [false] force-lto: [false]
plugins: [false] plugins: [false]
skip_artifact: ["no"] skip-artifact: [false]
crashpad: [true] skip-crashpad: [false]
clang-tidy-review: [false]
include: include:
# Ubuntu 20.04, Qt 5.12 # Ubuntu 20.04, Qt 5.12
- os: ubuntu-20.04 - os: ubuntu-20.04
qt-version: 5.12.12 qt-version: 5.12.12
pch: true
force-lto: false force-lto: false
plugins: false
skip-artifact: false
skip-crashpad: false
clang-tidy-review: false
# Ubuntu 22.04, Qt 5.15 # Ubuntu 22.04, Qt 5.15
- os: ubuntu-22.04 - os: ubuntu-22.04
qt-version: 5.15.2 qt-version: 5.15.2
pch: true
force-lto: false force-lto: false
# Ubuntu 22.04, Qt 6.2.4 plugins: false
skip-artifact: false
skip-crashpad: false
clang-tidy-review: true
# Ubuntu 22.04, Qt 6.2.4 - tests LTO & plugins
- os: ubuntu-22.04 - os: ubuntu-22.04
qt-version: 6.2.4 qt-version: 6.2.4
pch: false
force-lto: false
# Test for disabling Precompiled Headers & enabling link-time optimization and plugins
- os: ubuntu-22.04
qt-version: 5.15.2
pch: false
force-lto: true force-lto: true
skip_artifact: "yes"
plugins: true plugins: true
skip-artifact: false
skip-crashpad: false
clang-tidy-review: false
# Test for disabling crashpad on Windows # Test for disabling crashpad on Windows
- os: windows-latest - os: windows-latest
qt-version: 5.15.2 qt-version: 5.15.2
pch: false force-lto: false
force-lto: true plugins: false
skip_artifact: "yes" skip-artifact: true
crashpad: false skip-crashpad: true
clang-tidy-review: false
fail-fast: false fail-fast: false
steps: steps:
- name: Force LTO - name: Force LTO
if: matrix.force-lto == true if: matrix.force-lto
run: | run: |
echo "C2_ENABLE_LTO=ON" >> "$GITHUB_ENV" echo "C2_ENABLE_LTO=ON" >> "$GITHUB_ENV"
shell: bash shell: bash
- name: Enable plugin support - name: Enable plugin support
if: matrix.plugins == true if: matrix.plugins
run: | run: |
echo "C2_PLUGINS=ON" >> "$GITHUB_ENV" echo "C2_PLUGINS=ON" >> "$GITHUB_ENV"
shell: bash shell: bash
- name: Set Crashpad - name: Set Crashpad
if: matrix.crashpad == true if: matrix.skip-crashpad == false
run: | run: |
echo "C2_ENABLE_CRASHPAD=ON" >> "$GITHUB_ENV" echo "C2_ENABLE_CRASHPAD=ON" >> "$GITHUB_ENV"
shell: bash shell: bash
@ -167,13 +170,14 @@ jobs:
- name: Build (Windows) - name: Build (Windows)
if: startsWith(matrix.os, 'windows') if: startsWith(matrix.os, 'windows')
shell: pwsh
run: | run: |
cd build cd build
cmake ` cmake `
-G"NMake Makefiles" ` -G"NMake Makefiles" `
-DCMAKE_BUILD_TYPE=RelWithDebInfo ` -DCMAKE_BUILD_TYPE=RelWithDebInfo `
-DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" ` -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" `
-DUSE_PRECOMPILED_HEADERS=${{ matrix.pch }} ` -DUSE_PRECOMPILED_HEADERS=OFF `
-DBUILD_WITH_CRASHPAD="$Env:C2_ENABLE_CRASHPAD" ` -DBUILD_WITH_CRASHPAD="$Env:C2_ENABLE_CRASHPAD" `
-DCHATTERINO_LTO="$Env:C2_ENABLE_LTO" ` -DCHATTERINO_LTO="$Env:C2_ENABLE_LTO" `
-DCHATTERINO_PLUGINS="$Env:C2_PLUGINS" ` -DCHATTERINO_PLUGINS="$Env:C2_PLUGINS" `
@ -183,7 +187,8 @@ jobs:
nmake /S /NOLOGO nmake /S /NOLOGO
- name: Build crashpad (Windows) - name: Build crashpad (Windows)
if: startsWith(matrix.os, 'windows') && matrix.crashpad if: startsWith(matrix.os, 'windows') && !matrix.skip-crashpad
shell: pwsh
run: | run: |
cd build cd build
set cl=/MP set cl=/MP
@ -202,14 +207,14 @@ jobs:
7z a chatterino-windows-x86-64-Qt-${{ matrix.qt-version }}.zip Chatterino2/ 7z a chatterino-windows-x86-64-Qt-${{ matrix.qt-version }}.zip Chatterino2/
- name: Upload artifact (Windows - binary) - name: Upload artifact (Windows - binary)
if: startsWith(matrix.os, 'windows') && matrix.skip_artifact != 'yes' if: startsWith(matrix.os, 'windows') && !matrix.skip-artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: chatterino-windows-x86-64-Qt-${{ matrix.qt-version }}.zip name: chatterino-windows-x86-64-Qt-${{ matrix.qt-version }}.zip
path: build/chatterino-windows-x86-64-Qt-${{ matrix.qt-version }}.zip path: build/chatterino-windows-x86-64-Qt-${{ matrix.qt-version }}.zip
- name: Upload artifact (Windows - symbols) - name: Upload artifact (Windows - symbols)
if: startsWith(matrix.os, 'windows') && matrix.skip_artifact != 'yes' if: startsWith(matrix.os, 'windows') && !matrix.skip-artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: chatterino-windows-x86-64-Qt-${{ matrix.qt-version }}-symbols.pdb.7z name: chatterino-windows-x86-64-Qt-${{ matrix.qt-version }}-symbols.pdb.7z
@ -260,7 +265,7 @@ jobs:
-DCMAKE_INSTALL_PREFIX=appdir/usr/ \ -DCMAKE_INSTALL_PREFIX=appdir/usr/ \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DPAJLADA_SETTINGS_USE_BOOST_FILESYSTEM=On \ -DPAJLADA_SETTINGS_USE_BOOST_FILESYSTEM=On \
-DUSE_PRECOMPILED_HEADERS=${{ matrix.pch }} \ -DUSE_PRECOMPILED_HEADERS=OFF \
-DCMAKE_EXPORT_COMPILE_COMMANDS=On \ -DCMAKE_EXPORT_COMPILE_COMMANDS=On \
-DCHATTERINO_LTO="$C2_ENABLE_LTO" \ -DCHATTERINO_LTO="$C2_ENABLE_LTO" \
-DCHATTERINO_PLUGINS="$C2_PLUGINS" \ -DCHATTERINO_PLUGINS="$C2_PLUGINS" \
@ -270,7 +275,7 @@ jobs:
shell: bash shell: bash
- name: clang-tidy review - name: clang-tidy review
if: (startsWith(matrix.os, 'ubuntu') && matrix.pch == false && matrix.qt-version == '5.15.2' && github.event_name == 'pull_request') if: matrix.clang-tidy-review
uses: ZedThree/clang-tidy-review@v0.13.0 uses: ZedThree/clang-tidy-review@v0.13.0
with: with:
build_dir: build build_dir: build
@ -279,32 +284,32 @@ jobs:
exclude: "tests/*,lib/*" exclude: "tests/*,lib/*"
- name: clang-tidy-review upload - name: clang-tidy-review upload
if: (startsWith(matrix.os, 'ubuntu') && matrix.pch == false && matrix.qt-version == '5.15.2' && github.event_name == 'pull_request') if: matrix.clang-tidy-review
uses: ZedThree/clang-tidy-review/upload@v0.13.0 uses: ZedThree/clang-tidy-review/upload@v0.13.0
- name: Package - AppImage (Ubuntu) - name: Package - AppImage (Ubuntu)
if: startsWith(matrix.os, 'ubuntu-20.04') && matrix.skip_artifact != 'yes' if: startsWith(matrix.os, 'ubuntu-20.04') && !matrix.skip-artifact
run: | run: |
cd build cd build
sh ./../.CI/CreateAppImage.sh sh ./../.CI/CreateAppImage.sh
shell: bash shell: bash
- name: Package - .deb (Ubuntu) - name: Package - .deb (Ubuntu)
if: startsWith(matrix.os, 'ubuntu') && matrix.skip_artifact != 'yes' if: startsWith(matrix.os, 'ubuntu') && !matrix.skip-artifact
run: | run: |
cd build cd build
sh ./../.CI/CreateUbuntuDeb.sh sh ./../.CI/CreateUbuntuDeb.sh
shell: bash shell: bash
- name: Upload artifact - AppImage (Ubuntu) - name: Upload artifact - AppImage (Ubuntu)
if: startsWith(matrix.os, 'ubuntu-20.04') && matrix.skip_artifact != 'yes' if: startsWith(matrix.os, 'ubuntu-20.04') && !matrix.skip-artifact
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 - .deb (Ubuntu) - name: Upload artifact - .deb (Ubuntu)
if: startsWith(matrix.os, 'ubuntu') && matrix.skip_artifact != 'yes' if: startsWith(matrix.os, 'ubuntu') && !matrix.skip-artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: Chatterino-${{ matrix.os }}-Qt-${{ matrix.qt-version }}.deb name: Chatterino-${{ matrix.os }}-Qt-${{ matrix.qt-version }}.deb
@ -326,7 +331,7 @@ jobs:
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 \ -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 \
-DOPENSSL_ROOT_DIR=/usr/local/opt/openssl \ -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl \
-DUSE_PRECOMPILED_HEADERS=${{ matrix.pch }} \ -DUSE_PRECOMPILED_HEADERS=OFF \
-DCHATTERINO_LTO="$C2_ENABLE_LTO" \ -DCHATTERINO_LTO="$C2_ENABLE_LTO" \
-DCHATTERINO_PLUGINS="$C2_PLUGINS" \ -DCHATTERINO_PLUGINS="$C2_PLUGINS" \
-DBUILD_WITH_QT6="$C2_BUILD_WITH_QT6" \ -DBUILD_WITH_QT6="$C2_BUILD_WITH_QT6" \
@ -363,12 +368,6 @@ jobs:
with: with:
fetch-depth: 0 # allows for tags access fetch-depth: 0 # allows for tags access
- uses: actions/download-artifact@v3
name: macOS x86_64 Qt6.5.0 dmg
with:
name: chatterino-macos-Qt-6.5.0.dmg
path: release-artifacts/
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v3
name: Ubuntu 22.04 Qt6.2.4 deb name: Ubuntu 22.04 Qt6.2.4 deb
with: with:
@ -387,17 +386,6 @@ jobs:
name: chatterino-windows-x86-64-Qt-6.5.0-symbols.pdb.7z name: chatterino-windows-x86-64-Qt-6.5.0-symbols.pdb.7z
path: release-artifacts/ path: release-artifacts/
- name: Mark experimental
run: |
ls -l
# Mark all Qt6 builds as EXPERIMENTAL
mv chatterino-macos-Qt-6.5.0.dmg EXPERIMENTAL-chatterino-macos-Qt-6.5.0.dmg
mv Chatterino-ubuntu-22.04-x86_64.deb EXPERIMENTAL-Chatterino-ubuntu-22.04-Qt-6.2.4.deb
mv chatterino-windows-x86-64-Qt-6.5.0.zip EXPERIMENTAL-chatterino-windows-x86-64-Qt-6.5.0.zip
mv chatterino-Qt-6.5.0.pdb.7z EXPERIMENTAL-chatterino-Qt-6.5.0.pdb.7z
working-directory: release-artifacts
shell: bash
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v3
name: Windows Qt5.15.2 name: Windows Qt5.15.2
with: with:
@ -439,6 +427,19 @@ jobs:
cp .CI/chatterino-nightly.flatpakref release-artifacts/ cp .CI/chatterino-nightly.flatpakref release-artifacts/
shell: bash shell: bash
- name: Rename artifacts
run: |
ls -l
# Rename the macos build to indicate that it's for macOS 10.15 users
mv chatterino-macos-Qt-5.15.2.dmg Chatterino-macOS-10.15.dmg
# Mark all Qt6 builds as EXPERIMENTAL
mv Chatterino-ubuntu-22.04-x86_64.deb EXPERIMENTAL-Chatterino-ubuntu-22.04-Qt-6.2.4.deb
mv chatterino-windows-x86-64-Qt-6.5.0.zip EXPERIMENTAL-chatterino-windows-x86-64-Qt-6.5.0.zip
mv chatterino-Qt-6.5.0.pdb.7z EXPERIMENTAL-chatterino-Qt-6.5.0.pdb.7z
working-directory: release-artifacts
shell: bash
- name: Create release - name: Create release
uses: ncipollo/release-action@v1.12.0 uses: ncipollo/release-action@v1.12.0
with: with:

View file

@ -9,6 +9,7 @@
#include <memory> #include <memory>
#include <shared_mutex> #include <shared_mutex>
#include <unordered_map> #include <unordered_map>
#include <vector>
namespace chatterino { namespace chatterino {

View file

@ -15,6 +15,7 @@
#include <functional> #include <functional>
#include <mutex> #include <mutex>
#include <set> #include <set>
#include <vector>
namespace chatterino { namespace chatterino {