Use GitHub vars to determine custom runner names (#7509)
* Use `WINDOWS_RUNNER` var to determine custom runner name * Remove `if` step * Change var to `CI_WINDOWS_RUNNER` * Use other runner vars and fall back to free runners * Update ChangeLog * Use `CI_MAC_INTEL_RUNNER` * Set Mac name depending on var * Use `CI_LINUX_ARM_RUNNER` * Change CI var to `CI_ENABLE_PACKAGING` * Use exclusions to remove ARM runners when var not set * Switch to `CI_USE_LINUX_ARM_RUNNER` var * Exclude arm runners if `CI_USE_LINUX_ARM_RUNNER` not set * Fixed path and actually capture `matrix` as var * Fixed path * Add debug step * Kick build * Add EOL delimiters * Move action to composite action for reuse * Make JSON output pretty * Add shell prop * Fixed output var name * Cleanup debug * Move debug to same step * Kick build * Use `needs` on other jobs * Also depend unix on setup
This commit is contained in:
76
.github/workflows/ci-linux.json
vendored
Normal file
76
.github/workflows/ci-linux.json
vendored
Normal file
@ -0,0 +1,76 @@
|
||||
{
|
||||
"distro": [
|
||||
{
|
||||
"name": "debian-13-amd64",
|
||||
"container": "symless/synergy-core:debian-13-amd64",
|
||||
"runs-on": "ubuntu-latest",
|
||||
"extra-packages": true
|
||||
},
|
||||
{
|
||||
"name": "debian-12-arm64",
|
||||
"container": "symless/synergy-core:debian-12-arm64",
|
||||
"runs-on": "ubuntu-24.04-8-core-arm64",
|
||||
"extra-packages": true
|
||||
},
|
||||
{
|
||||
"name": "debian-12-amd64",
|
||||
"container": "symless/synergy-core:debian-12-amd64",
|
||||
"runs-on": "ubuntu-latest",
|
||||
"extra-packages": true
|
||||
},
|
||||
{
|
||||
"name": "ubuntu-24.04-amd64",
|
||||
"container": "symless/synergy-core:ubuntu-24.04-amd64",
|
||||
"runs-on": "ubuntu-latest",
|
||||
"extra-dep-args": "--meson-no-system libportal --meson-static libportal --subprojects",
|
||||
"extra-cmake-args": "-DSYSTEM_LIBPORTAL=OFF -DSTATIC_LIBPORTAL=ON"
|
||||
},
|
||||
{
|
||||
"name": "ubuntu-22.04-amd64",
|
||||
"container": "symless/synergy-core:ubuntu-22.04-amd64",
|
||||
"runs-on": "ubuntu-latest"
|
||||
},
|
||||
{
|
||||
"name": "fedora-40-arm64",
|
||||
"container": "symless/synergy-core:fedora-40-arm64",
|
||||
"runs-on": "ubuntu-24.04-8-core-arm64"
|
||||
},
|
||||
{
|
||||
"name": "fedora-40-amd64",
|
||||
"container": "symless/synergy-core:fedora-40-amd64",
|
||||
"runs-on": "ubuntu-latest"
|
||||
},
|
||||
{
|
||||
"name": "fedora-39-amd64",
|
||||
"container": "symless/synergy-core:fedora-39-amd64",
|
||||
"runs-on": "ubuntu-latest"
|
||||
},
|
||||
{
|
||||
"name": "opensuse-amd64",
|
||||
"container": "symless/synergy-core:opensuse-amd64",
|
||||
"runs-on": "ubuntu-latest"
|
||||
},
|
||||
{
|
||||
"name": "rockylinux-9-amd64",
|
||||
"container": "symless/synergy-core:rockylinux-9-amd64",
|
||||
"runs-on": "ubuntu-latest"
|
||||
},
|
||||
{
|
||||
"name": "almalinux-9-amd64",
|
||||
"container": "symless/synergy-core:almalinux-9-amd64",
|
||||
"runs-on": "ubuntu-latest"
|
||||
},
|
||||
{
|
||||
"name": "archlinux-amd64",
|
||||
"container": "symless/synergy-core:archlinux-amd64",
|
||||
"runs-on": "ubuntu-latest",
|
||||
"package-user": "build"
|
||||
},
|
||||
{
|
||||
"name": "manjaro-amd64",
|
||||
"container": "symless/synergy-core:manjaro-amd64",
|
||||
"runs-on": "ubuntu-latest",
|
||||
"package-user": "build"
|
||||
}
|
||||
]
|
||||
}
|
||||
106
.github/workflows/ci.yml
vendored
106
.github/workflows/ci.yml
vendored
@ -42,6 +42,7 @@ jobs:
|
||||
uses: ./.github/actions/run-tests-setup
|
||||
|
||||
windows:
|
||||
needs: setup
|
||||
name: ${{ matrix.target.name }}
|
||||
runs-on: ${{ matrix.target.runs-on }}
|
||||
container: ${{ matrix.target.container }}
|
||||
@ -55,7 +56,7 @@ jobs:
|
||||
matrix:
|
||||
target:
|
||||
- name: windows-2022-x64
|
||||
runs-on: windows-2022-8-core-x64
|
||||
runs-on: ${{ vars.CI_WINDOWS_RUNNER || 'windows-2022' }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
@ -113,14 +114,14 @@ jobs:
|
||||
job: ${{ matrix.target.name }}
|
||||
|
||||
- name: Package
|
||||
if: ${{ vars.SYNERGY_ENABLE_PACKAGING && env.PACKAGE_BUILD == 'true' }}
|
||||
if: ${{ vars.CI_ENABLE_PACKAGING && env.PACKAGE_BUILD == 'true' }}
|
||||
run: python ./scripts/package.py
|
||||
env:
|
||||
WINDOWS_PFX_CERTIFICATE: ${{ secrets.WINDOWS_PFX }}
|
||||
WINDOWS_PFX_PASSWORD: ${{ secrets.WINDOWS_PFX_PASS }}
|
||||
|
||||
- name: Upload
|
||||
if: ${{ vars.SYNERGY_ENABLE_PACKAGING && env.PACKAGE_UPLOAD == 'true' }}
|
||||
if: ${{ vars.CI_ENABLE_PACKAGING && env.PACKAGE_UPLOAD == 'true' }}
|
||||
uses: ./.github/actions/dist-upload
|
||||
with:
|
||||
use_github: ${{ env.UPLOAD_TO_GITHUB }}
|
||||
@ -132,6 +133,7 @@ jobs:
|
||||
package-version: ${{ env.SYNERGY_VERSION }}
|
||||
|
||||
macos:
|
||||
needs: setup
|
||||
name: ${{ matrix.target.name }}
|
||||
runs-on: ${{ matrix.target.os }}
|
||||
timeout-minutes: ${{ matrix.target.timeout }}
|
||||
@ -153,9 +155,9 @@ jobs:
|
||||
arch: arm64
|
||||
shell: "/usr/bin/arch -arch arm64e /bin/bash --noprofile --norc -eo pipefail {0}"
|
||||
|
||||
- name: "macos-14-x64"
|
||||
- name: ${{ vars.CI_MAC_INTEL_NAME || 'macos-13-x64' }}
|
||||
timeout: 20
|
||||
os: "macos-14-large"
|
||||
os: ${{ vars.CI_MAC_INTEL_RUNNER || 'macos-13' }}
|
||||
arch: x64
|
||||
shell: "bash"
|
||||
|
||||
@ -195,7 +197,7 @@ jobs:
|
||||
job: ${{ matrix.target.name }}
|
||||
|
||||
- name: Package
|
||||
if: ${{ vars.SYNERGY_ENABLE_PACKAGING && env.PACKAGE_BUILD == 'true' }}
|
||||
if: ${{ vars.CI_ENABLE_PACKAGING && env.PACKAGE_BUILD == 'true' }}
|
||||
run: ./scripts/package.py
|
||||
env:
|
||||
APPLE_CODESIGN_ID: ${{ secrets.APPLE_CODESIGN_ID }}
|
||||
@ -206,7 +208,7 @@ jobs:
|
||||
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
||||
|
||||
- name: Upload
|
||||
if: ${{ vars.SYNERGY_ENABLE_PACKAGING && env.PACKAGE_UPLOAD == 'true' }}
|
||||
if: ${{ vars.CI_ENABLE_PACKAGING && env.PACKAGE_UPLOAD == 'true' }}
|
||||
uses: ./.github/actions/dist-upload
|
||||
with:
|
||||
use_github: ${{ env.UPLOAD_TO_GITHUB }}
|
||||
@ -217,7 +219,26 @@ jobs:
|
||||
gdrive-parent-folder-id: ${{ secrets.GOOGLE_DRIVE_TECH_DRIVE }}
|
||||
package-version: ${{ env.SYNERGY_VERSION }}
|
||||
|
||||
linux-matrix:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
outputs:
|
||||
json-matrix: ${{ steps.filter.outputs.json }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Filter JSON
|
||||
uses: ./.github/actions/filter-json
|
||||
id: filter
|
||||
with:
|
||||
json-file: .github/workflows/ci-linux.json
|
||||
condition: '"${{ vars.CI_USE_LINUX_ARM_RUNNER }}" != "true"'
|
||||
jq-filter: .distro |= map(select(.["runs-on"] | contains("arm64") | not))
|
||||
|
||||
linux:
|
||||
needs: [setup, linux-matrix]
|
||||
name: linux-${{ matrix.distro.name }}
|
||||
runs-on: ${{ matrix.distro.runs-on }}
|
||||
container: ${{ matrix.distro.container }}
|
||||
@ -227,69 +248,7 @@ jobs:
|
||||
# Normally, we want to fail fast, but in this case we shouldn't since one distro may
|
||||
# fail due to transient issues unrelated to the build.
|
||||
fail-fast: false
|
||||
|
||||
matrix:
|
||||
distro:
|
||||
- name: debian-13-amd64
|
||||
container: symless/synergy-core:debian-13-amd64
|
||||
runs-on: ubuntu-latest
|
||||
extra-packages: true
|
||||
|
||||
- name: debian-12-arm64
|
||||
container: symless/synergy-core:debian-12-arm64
|
||||
runs-on: ubuntu-24.04-8-core-arm64
|
||||
extra-packages: true
|
||||
|
||||
- name: debian-12-amd64
|
||||
container: symless/synergy-core:debian-12-amd64
|
||||
runs-on: ubuntu-latest
|
||||
extra-packages: true
|
||||
|
||||
- name: ubuntu-24.04-amd64
|
||||
container: symless/synergy-core:ubuntu-24.04-amd64
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# Static libportal only needed until libportal is updated to 0.8.x.
|
||||
extra-dep-args: --meson-no-system libportal --meson-static libportal --subprojects
|
||||
extra-cmake-args: -DSYSTEM_LIBPORTAL=OFF -DSTATIC_LIBPORTAL=ON
|
||||
|
||||
- name: ubuntu-22.04-amd64
|
||||
container: symless/synergy-core:ubuntu-22.04-amd64
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
- name: fedora-40-arm64
|
||||
container: symless/synergy-core:fedora-40-arm64
|
||||
runs-on: ubuntu-24.04-8-core-arm64
|
||||
|
||||
- name: fedora-40-amd64
|
||||
container: symless/synergy-core:fedora-40-amd64
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
- name: fedora-39-amd64
|
||||
container: symless/synergy-core:fedora-39-amd64
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
- name: opensuse-amd64
|
||||
container: symless/synergy-core:opensuse-amd64
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
- name: rockylinux-9-amd64
|
||||
container: symless/synergy-core:rockylinux-9-amd64
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
- name: almalinux-9-amd64
|
||||
container: symless/synergy-core:almalinux-9-amd64
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
- name: archlinux-amd64
|
||||
container: symless/synergy-core:archlinux-amd64
|
||||
runs-on: ubuntu-latest
|
||||
package-user: build
|
||||
|
||||
- name: manjaro-amd64
|
||||
container: symless/synergy-core:manjaro-amd64
|
||||
runs-on: ubuntu-latest
|
||||
package-user: build
|
||||
matrix: ${{fromJson(needs.linux-matrix.outputs.json-matrix)}}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
@ -327,14 +286,14 @@ jobs:
|
||||
job: linux-${{ matrix.distro.name }}
|
||||
|
||||
- name: Package
|
||||
if: ${{ vars.SYNERGY_ENABLE_PACKAGING && env.PACKAGE_BUILD == 'true' }}
|
||||
if: ${{ vars.CI_ENABLE_PACKAGING && env.PACKAGE_BUILD == 'true' }}
|
||||
env:
|
||||
LINUX_EXTRA_PACKAGES: ${{ matrix.distro.extra-packages }}
|
||||
LINUX_PACKAGE_USER: ${{ matrix.distro.package-user }}
|
||||
run: ./scripts/package.py
|
||||
|
||||
- name: Upload
|
||||
if: ${{ vars.SYNERGY_ENABLE_PACKAGING && env.PACKAGE_UPLOAD == 'true' }}
|
||||
if: ${{ vars.CI_ENABLE_PACKAGING && env.PACKAGE_UPLOAD == 'true' }}
|
||||
uses: ./.github/actions/dist-upload
|
||||
with:
|
||||
use_github: ${{ env.UPLOAD_TO_GITHUB }}
|
||||
@ -347,8 +306,9 @@ jobs:
|
||||
|
||||
# Technically, "unix" is a misnomer, but we use it here to mean "Unix-like BSD-derived".
|
||||
unix:
|
||||
needs: setup
|
||||
name: unix-${{ matrix.distro.name }}
|
||||
runs-on: ubuntu-24.04-16-core-x64
|
||||
runs-on: ${{ vars.CI_UNIX_RUNNER || 'ubuntu-24.04' }}
|
||||
timeout-minutes: 20
|
||||
|
||||
env:
|
||||
|
||||
2
.github/workflows/codeql-analysis.yml
vendored
2
.github/workflows/codeql-analysis.yml
vendored
@ -16,7 +16,7 @@ jobs:
|
||||
if: ${{ !github.event.pull_request.draft }}
|
||||
|
||||
name: Analyze
|
||||
runs-on: ubuntu-24.04-16-core-x64
|
||||
runs-on: ${{ vars.CODEQL_RUNNER || 'ubuntu-24.04' }}
|
||||
container: symless/synergy-core:ubuntu-24.04-amd64
|
||||
timeout-minutes: 20
|
||||
|
||||
|
||||
2
.github/workflows/sonarcloud-analysis.yml
vendored
2
.github/workflows/sonarcloud-analysis.yml
vendored
@ -15,7 +15,7 @@ jobs:
|
||||
sonarcloud-analysis:
|
||||
if: ${{ vars.SONAR_SCANNER_ENABLED }}
|
||||
|
||||
runs-on: ubuntu-24.04-32-core-x64
|
||||
runs-on: ${{ vars.SONAR_SCANNER_RUNNER || 'ubuntu-24.04' }}
|
||||
container: symless/synergy-core:ubuntu-22.04-amd64
|
||||
timeout-minutes: 20
|
||||
|
||||
|
||||
Reference in New Issue
Block a user