mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-08 00:53:57 -07:00
CI: Update build matrix & clean naming (#5040)
--------- Co-authored-by: ebbit1q <ebbit1q@gmail.com> Co-authored-by: ZeldaZach <zahalpern+github@gmail.com>
This commit is contained in:
parent
5f4ad87a47
commit
11d58abbc3
8 changed files with 79 additions and 89 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
FROM ubuntu:focal
|
FROM ubuntu:20.04
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
FROM ubuntu:jammy
|
FROM ubuntu:22.04
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
FROM ubuntu:noble
|
FROM ubuntu:24.04
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
FROM ubuntu:bionic
|
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
||||||
build-essential \
|
|
||||||
ccache \
|
|
||||||
clang-format \
|
|
||||||
cmake \
|
|
||||||
file \
|
|
||||||
g++ \
|
|
||||||
git \
|
|
||||||
liblzma-dev \
|
|
||||||
libmariadb-dev-compat \
|
|
||||||
libprotobuf-dev \
|
|
||||||
libqt5multimedia5-plugins \
|
|
||||||
libqt5sql5-mysql \
|
|
||||||
libqt5svg5-dev \
|
|
||||||
libqt5websockets5-dev \
|
|
||||||
protobuf-compiler \
|
|
||||||
qt5-default \
|
|
||||||
qt5-image-formats-plugins \
|
|
||||||
qtmultimedia5-dev \
|
|
||||||
qttools5-dev \
|
|
||||||
qttools5-dev-tools \
|
|
||||||
&& apt-get clean \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
@ -189,6 +189,12 @@ fi
|
||||||
|
|
||||||
if [[ $MAKE_PACKAGE ]]; then
|
if [[ $MAKE_PACKAGE ]]; then
|
||||||
echo "::group::Create package"
|
echo "::group::Create package"
|
||||||
|
|
||||||
|
if [[ $RUNNER_OS == macOS ]]; then
|
||||||
|
# Workaround https://github.com/actions/runner-images/issues/7522
|
||||||
|
echo "killing XProtectBehaviorService"; sudo pkill -9 XProtect >/dev/null || true;
|
||||||
|
echo "waiting for XProtectBehaviorService kill"; while pgrep "XProtect"; do sleep 3; done;
|
||||||
|
fi
|
||||||
cmake --build . --target package --config "$BUILDTYPE"
|
cmake --build . --target package --config "$BUILDTYPE"
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,19 +8,18 @@ git push -d origin --REPLACE-WITH-BETA-LIST--
|
||||||
include different targets -->
|
include different targets -->
|
||||||
<pre>
|
<pre>
|
||||||
<b>Pre-compiled binaries we serve:</b>
|
<b>Pre-compiled binaries we serve:</b>
|
||||||
- <kbd>Windows 7+</kbd>
|
|
||||||
- <kbd>Windows 10+</kbd>
|
- <kbd>Windows 10+</kbd>
|
||||||
- <kbd>macOS 10.15+</kbd> ("Catalina")
|
- <kbd>Windows 7+</kbd>
|
||||||
- <kbd>macOS 13+</kbd> ("Ventura")
|
- <kbd>macOS 13+</kbd> ("Ventura") / Apple M
|
||||||
- <kbd>Ubuntu 18.04 LTS</kbd> ("Bionic Beaver")
|
- <kbd>macOS 13+</kbd> ("Ventura") / Intel
|
||||||
- <kbd>Ubuntu 20.04 LTS</kbd> ("Focal Fossa")
|
|
||||||
- <kbd>Ubuntu 22.04 LTS</kbd> ("Jammy Jellyfish")
|
|
||||||
- <kbd>Ubuntu 24.04 LTS</kbd> ("Noble Numbat")
|
- <kbd>Ubuntu 24.04 LTS</kbd> ("Noble Numbat")
|
||||||
- <kbd>Debian 11</kbd> ("Bullseye")
|
- <kbd>Ubuntu 22.04 LTS</kbd> ("Jammy Jellyfish")
|
||||||
|
- <kbd>Ubuntu 20.04 LTS</kbd> ("Focal Fossa")
|
||||||
- <kbd>Debian 12</kbd> ("Bookworm")
|
- <kbd>Debian 12</kbd> ("Bookworm")
|
||||||
- <kbd>Fedora 39</kbd>
|
- <kbd>Debian 11</kbd> ("Bullseye")
|
||||||
- <kbd>Fedora 40</kbd>
|
- <kbd>Fedora 40</kbd>
|
||||||
<kbd>We are also packaged in Arch Linux's official community repository, courtesy of @FFY00</kbd></i>
|
- <kbd>Fedora 39</kbd>
|
||||||
|
<kbd>We are also packaged in Arch Linux's official "extra" repository, courtesy of @FFY00</kbd></i>
|
||||||
<kbd>General Linux support is available via a flatpak package (Flathub)</kbd></i>
|
<kbd>General Linux support is available via a flatpak package (Flathub)</kbd></i>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
|
|
||||||
114
.github/workflows/desktop-build.yml
vendored
114
.github/workflows/desktop-build.yml
vendored
|
|
@ -37,13 +37,13 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
tag_regex='^refs/tags/'
|
tag_regex='^refs/tags/'
|
||||||
if [[ $GITHUB_EVENT_NAME == pull-request ]]; then # pull request
|
if [[ $GITHUB_EVENT_NAME == pull-request ]]; then # pull request
|
||||||
sha="${{github.event.pull_request.head.sha}}"
|
sha="${{github.event.pull_request.head.sha}}"
|
||||||
elif [[ $GITHUB_REF =~ $tag_regex ]]; then # release
|
elif [[ $GITHUB_REF =~ $tag_regex ]]; then # release
|
||||||
sha="$GITHUB_SHA"
|
sha="$GITHUB_SHA"
|
||||||
tag="${GITHUB_REF/refs\/tags\//}"
|
tag="${GITHUB_REF/refs\/tags\//}"
|
||||||
echo "tag=$tag" >>"$GITHUB_OUTPUT"
|
echo "tag=$tag" >>"$GITHUB_OUTPUT"
|
||||||
else # push to branch
|
else # push to branch
|
||||||
sha="$GITHUB_SHA"
|
sha="$GITHUB_SHA"
|
||||||
fi
|
fi
|
||||||
echo "sha=$sha" >>"$GITHUB_OUTPUT"
|
echo "sha=$sha" >>"$GITHUB_OUTPUT"
|
||||||
|
|
@ -85,46 +85,52 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
# these names correspond to the files in .ci/$distro
|
# These names correspond to the files in ".ci/$distro$version"
|
||||||
include:
|
include:
|
||||||
- distro: ArchLinux
|
- distro: Arch
|
||||||
package: skip # we are packaged in arch already
|
package: skip # We are packaged in Arch already
|
||||||
allow-failure: yes
|
allow-failure: yes
|
||||||
|
|
||||||
- distro: Debian11
|
- distro: Debian
|
||||||
|
version: 11
|
||||||
|
package: DEB
|
||||||
|
test: skip # Running tests on all distros is superfluous
|
||||||
|
|
||||||
|
- distro: Debian
|
||||||
|
version: 12
|
||||||
package: DEB
|
package: DEB
|
||||||
|
|
||||||
- distro: Debian12
|
- distro: Fedora
|
||||||
package: DEB
|
version: 39
|
||||||
|
package: RPM
|
||||||
|
test: skip # Running tests on all distros is superfluous
|
||||||
|
|
||||||
- distro: Fedora39
|
- distro: Fedora
|
||||||
|
version: 40
|
||||||
package: RPM
|
package: RPM
|
||||||
|
|
||||||
- distro: Fedora40
|
- distro: Ubuntu
|
||||||
package: RPM
|
version: 20.04
|
||||||
|
package: DEB
|
||||||
|
test: skip # Ubuntu 20.04 has a broken Qt for debug builds
|
||||||
|
|
||||||
- distro: UbuntuBionic
|
- distro: Ubuntu
|
||||||
|
version: 22.04
|
||||||
|
package: DEB
|
||||||
|
test: skip # Running tests on all distros is superfluous
|
||||||
|
|
||||||
|
- distro: Ubuntu
|
||||||
|
version: 24.04
|
||||||
package: DEB
|
package: DEB
|
||||||
|
|
||||||
- distro: UbuntuFocal
|
name: ${{matrix.distro}} ${{matrix.version}}
|
||||||
package: DEB
|
|
||||||
test: skip # UbuntuFocal has a broken qt for debug builds
|
|
||||||
|
|
||||||
- distro: UbuntuJammy
|
|
||||||
package: DEB
|
|
||||||
test: skip # running tests on all distros is superfluous
|
|
||||||
|
|
||||||
- distro: UbuntuNoble
|
|
||||||
package: DEB
|
|
||||||
|
|
||||||
name: ${{matrix.distro}}
|
|
||||||
needs: configure
|
needs: configure
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
continue-on-error: ${{matrix.allow-failure == 'yes'}}
|
continue-on-error: ${{matrix.allow-failure == 'yes'}}
|
||||||
env:
|
env:
|
||||||
NAME: ${{matrix.distro}}
|
NAME: ${{matrix.distro}}${{matrix.version}}
|
||||||
CACHE: /tmp/${{matrix.distro}}-cache # ${{runner.temp}} does not work?
|
CACHE: /tmp/${{matrix.distro}}${{matrix.version}}-cache # ${{runner.temp}} does not work?
|
||||||
# cache size over the entire repo is 10Gi link:
|
# Cache size over the entire repo is 10Gi:
|
||||||
# https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy
|
# https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy
|
||||||
CCACHE_SIZE: 200M
|
CCACHE_SIZE: 200M
|
||||||
|
|
||||||
|
|
@ -132,7 +138,7 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Get cache timestamp
|
- name: Generate cache timestamp
|
||||||
id: cache_timestamp
|
id: cache_timestamp
|
||||||
shell: bash
|
shell: bash
|
||||||
run: echo "timestamp=$(date -u '+%Y%m%d%H%M%S')" >>"$GITHUB_OUTPUT"
|
run: echo "timestamp=$(date -u '+%Y%m%d%H%M%S')" >>"$GITHUB_OUTPUT"
|
||||||
|
|
@ -143,19 +149,17 @@ jobs:
|
||||||
timestamp: ${{steps.cache_timestamp.outputs.timestamp}}
|
timestamp: ${{steps.cache_timestamp.outputs.timestamp}}
|
||||||
with:
|
with:
|
||||||
path: ${{env.CACHE}}
|
path: ${{env.CACHE}}
|
||||||
key: docker-${{matrix.distro}}-cache-${{env.timestamp}}
|
key: docker-${{matrix.distro}}${{matrix.version}}-cache-${{env.timestamp}}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
docker-${{matrix.distro}}-cache-
|
docker-${{matrix.distro}}${{matrix.version}}-cache-
|
||||||
|
|
||||||
- name: Build ${{matrix.distro}} Docker image
|
- name: Build ${{matrix.distro}} ${{matrix.version}} Docker image
|
||||||
shell: bash
|
shell: bash
|
||||||
run: source .ci/docker.sh --build
|
run: source .ci/docker.sh --build
|
||||||
|
|
||||||
- name: Build debug and test
|
- name: Build debug and test
|
||||||
if: matrix.test != 'skip'
|
if: matrix.test != 'skip'
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
|
||||||
distro: '${{matrix.distro}}'
|
|
||||||
run: |
|
run: |
|
||||||
source .ci/docker.sh
|
source .ci/docker.sh
|
||||||
RUN --server --debug --test --ccache "$CCACHE_SIZE" --parallel 4
|
RUN --server --debug --test --ccache "$CCACHE_SIZE" --parallel 4
|
||||||
|
|
@ -166,8 +170,7 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
BUILD_DIR: build
|
BUILD_DIR: build
|
||||||
SUFFIX: '-${{matrix.distro}}'
|
SUFFIX: '-${{matrix.distro}}${{matrix.version}}'
|
||||||
distro: '${{matrix.distro}}'
|
|
||||||
type: '${{matrix.package}}'
|
type: '${{matrix.package}}'
|
||||||
run: |
|
run: |
|
||||||
source .ci/docker.sh
|
source .ci/docker.sh
|
||||||
|
|
@ -179,7 +182,7 @@ jobs:
|
||||||
if: matrix.package != 'skip'
|
if: matrix.package != 'skip'
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{matrix.distro}}-package
|
name: ${{matrix.distro}}${{matrix.version}}-package
|
||||||
path: ${{steps.build.outputs.path}}
|
path: ${{steps.build.outputs.path}}
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
|
|
@ -198,24 +201,30 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- target: 12_Monterey_and_13_Ventura
|
- target: 13
|
||||||
os: macos-12
|
soc: Intel
|
||||||
xcode: "14.0.1"
|
os: macos-13
|
||||||
|
xcode: "14.3.1"
|
||||||
type: Release
|
type: Release
|
||||||
|
core_count: 4
|
||||||
make_package: 1
|
make_package: 1
|
||||||
|
|
||||||
- target: 14_Sonoma
|
- target: 14
|
||||||
|
soc: Apple
|
||||||
os: macos-14
|
os: macos-14
|
||||||
xcode: "15.4"
|
xcode: "14.3.1"
|
||||||
type: Release
|
type: Release
|
||||||
|
core_count: 3
|
||||||
make_package: 1
|
make_package: 1
|
||||||
|
|
||||||
- target: 14_Sonoma_Debug
|
- target: 14
|
||||||
|
soc: Apple
|
||||||
os: macos-14
|
os: macos-14
|
||||||
xcode: "15.4"
|
xcode: "14.3.1"
|
||||||
type: Debug
|
type: Debug
|
||||||
|
core_count: 3
|
||||||
|
|
||||||
name: macOS${{matrix.target}}
|
name: macOS ${{matrix.target}}${{ matrix.soc == 'Intel' && ' Intel' || '' }}${{ matrix.type == 'Debug' && ' Debug' || '' }}
|
||||||
needs: configure
|
needs: configure
|
||||||
runs-on: ${{matrix.os}}
|
runs-on: ${{matrix.os}}
|
||||||
continue-on-error: ${{matrix.allow-failure == 'yes'}}
|
continue-on-error: ${{matrix.allow-failure == 'yes'}}
|
||||||
|
|
@ -229,8 +238,8 @@ jobs:
|
||||||
|
|
||||||
- name: Install dependencies using Homebrew
|
- name: Install dependencies using Homebrew
|
||||||
shell: bash
|
shell: bash
|
||||||
# cmake cannot find the mysql connector
|
# CMake cannot find the MySQL connector
|
||||||
# neither of these works: mariadb-connector-c mysql-connector-c++
|
# Neither of these works: mariadb-connector-c mysql-connector-c++
|
||||||
env:
|
env:
|
||||||
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
|
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -244,16 +253,17 @@ jobs:
|
||||||
BUILDTYPE: '${{matrix.type}}'
|
BUILDTYPE: '${{matrix.type}}'
|
||||||
MAKE_TEST: 1
|
MAKE_TEST: 1
|
||||||
MAKE_PACKAGE: '${{matrix.make_package}}'
|
MAKE_PACKAGE: '${{matrix.make_package}}'
|
||||||
PACKAGE_SUFFIX: '-macOS-${{matrix.target}}'
|
PACKAGE_SUFFIX: '-macOS${{matrix.target}}_${{matrix.soc}}'
|
||||||
# macOS runner actually have only 3 cores
|
# macOS runner have 3 cores usually - only the macos-13 image has 4:
|
||||||
# See https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
|
# https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
|
||||||
run: .ci/compile.sh --server --parallel 3
|
# https://github.com/actions/runner-images?tab=readme-ov-file#available-images
|
||||||
|
run: .ci/compile.sh --server --parallel ${{matrix.core_count}}
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
if: matrix.make_package
|
if: matrix.make_package
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: macOS-${{matrix.target}}-dmg
|
name: macOS${{matrix.target}}${{ matrix.soc == 'Intel' && '_Intel' || '' }}${{ matrix.type == 'Debug' && '_Debug' || '' }}-dmg
|
||||||
path: ${{steps.build.outputs.path}}
|
path: ${{steps.build.outputs.path}}
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue