Skip to content

Commit

Permalink
ci: try universal binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
Nerixyz committed Sep 27, 2024
1 parent 2057d74 commit 429c5f1
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 34 deletions.
54 changes: 24 additions & 30 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,30 +110,21 @@ jobs:
path: build/Chatterino-${{ matrix.os }}-x86_64.deb

build:
name: "Build ${{ matrix.os }}${{ matrix.arch && format(' ({0})', matrix.arch) || ''}}, Qt ${{ matrix.qt-version }} (LTO:${{ matrix.force-lto }}, crashpad:${{ matrix.skip-crashpad && 'off' || 'on' }})"
name: "Build ${{ matrix.os }}, Qt ${{ matrix.qt-version }} (LTO:${{ matrix.force-lto }}, crashpad:${{ matrix.skip-crashpad && 'off' || 'on' }})"
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
# Windows
- os: windows-latest
qt-version: 6.7.1
qt-version: 6.7.3
force-lto: false
plugins: true
skip-artifact: false
skip-crashpad: false
# macOS (ARM)
- os: macos-latest
qt-version: 6.7.1
arch: arm64
force-lto: false
plugins: true
skip-artifact: false
skip-crashpad: false
# macOS (x86)
- os: macos-13
qt-version: 6.7.1
arch: x86_64
qt-version: 6.7.3
force-lto: false
plugins: true
skip-artifact: false
Expand Down Expand Up @@ -306,15 +297,15 @@ jobs:
-DCHATTERINO_PLUGINS="$C2_PLUGINS" \
-DBUILD_WITH_QT6="$C2_BUILD_WITH_QT6" \
-DCHATTERINO_NO_AVIF_PLUGIN=On \
-DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }} \
-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64 \
..
make -j"$(sysctl -n hw.logicalcpu)"
shell: bash

- name: Package (MacOS)
if: startsWith(matrix.os, 'macos')
env:
OUTPUT_DMG_PATH: chatterino-macos-Qt-${{ matrix.qt-version}}-${{ matrix.arch }}.dmg
OUTPUT_DMG_PATH: chatterino-macos-Qt-${{ matrix.qt-version}}-universal.dmg
run: |
ls -la
pwd
Expand All @@ -334,8 +325,18 @@ jobs:
if: startsWith(matrix.os, 'macos')
uses: actions/upload-artifact@v4
with:
name: chatterino-macos-Qt-${{ matrix.qt-version }}-${{ matrix.arch }}.dmg
path: build/chatterino-macos-Qt-${{ matrix.qt-version }}-${{ matrix.arch }}.dmg
name: chatterino-macos-Qt-${{ matrix.qt-version }}-universal.dmg
path: build/chatterino-macos-Qt-${{ matrix.qt-version }}-universal.dmg

- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
timeout-minutes: 15

- if: failure()
name: Setup tmate session
uses: mxschmitt/action-tmate@v3
timeout-minutes: 15

create-release:
needs: [build-ubuntu-docker, build]
runs-on: ubuntu-latest
Expand All @@ -348,15 +349,15 @@ jobs:

# Windows
- uses: actions/download-artifact@v4
name: Windows Qt6.7.1
name: Windows Qt6.7.3
with:
name: chatterino-windows-x86-64-Qt-6.7.1.zip
name: chatterino-windows-x86-64-Qt-6.7.3.zip
path: release-artifacts/

- uses: actions/download-artifact@v4
name: Windows Qt6.7.1 symbols
name: Windows Qt6.7.3 symbols
with:
name: chatterino-windows-x86-64-Qt-6.7.1-symbols.pdb.7z
name: chatterino-windows-x86-64-Qt-6.7.3-symbols.pdb.7z
path: release-artifacts/

# Linux
Expand All @@ -380,23 +381,16 @@ jobs:

# macOS
- uses: actions/download-artifact@v4
name: macOS x86_64 Qt6.7.1 x86 dmg
with:
name: chatterino-macos-Qt-6.7.1-x86_64.dmg
path: release-artifacts/

- uses: actions/download-artifact@v4
name: macOS x86_64 Qt6.7.1 ARM dmg
name: macOS Qt6.7.3 dmg
with:
name: chatterino-macos-Qt-6.7.1-arm64.dmg
name: chatterino-macos-Qt-6.7.3-universal.dmg
path: release-artifacts/

- name: Rename artifacts
run: |
ls -l
# Rename the macos build to indicate that it's for macOS 12.0 users
mv chatterino-macos-Qt-6.7.1-x86_64.dmg Chatterino-macOS-12.0-x86_64.dmg
mv chatterino-macos-Qt-6.7.1-arm64.dmg Chatterino-macOS-12.0-arm64.dmg
mv chatterino-macos-Qt-6.7.3-x86_64.dmg Chatterino-macOS-12.0-universal.dmg
working-directory: release-artifacts
shell: bash

Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/create-installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
strategy:
matrix:
qt-version: ["6.7.1"]
qt-version: ["6.7.3"]
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -148,10 +148,9 @@ jobs:
mv Chatterino-x86_64-Qt-6.7.2.AppImage Chatterino-x86_64-Qt6.AppImage
mv chatterino-windows-x86-64-Qt-6.7.1-symbols.pdb.7z Chatterino-Windows-debug-symbols.pdb.7z
mv chatterino-windows-x86-64-Qt-6.7.3-symbols.pdb.7z Chatterino-Windows-debug-symbols.pdb.7z
mv chatterino-macos-Qt-6.7.1-x86_64.dmg Chatterino-x86_64.dmg
mv chatterino-macos-Qt-6.7.1-arm64.dmg Chatterino-arm64.dmg
mv chatterino-macos-Qt-6.7.3-universal.dmg Chatterino.dmg
- name: Hash files
working-directory: build
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,4 @@ jobs:
plugin: gcov
fail_ci_if_error: true
verbose: true
if: false

0 comments on commit 429c5f1

Please sign in to comment.