Use larger builders for CPU-bound workflows (#2256)

- `ubuntu-22.04-firezone` is a 16-core builder for ~~kotlin~~ and docker
- ~~`macos-13-xlarge` is an M1 builder for Apple and docker arm64~~
- Configure the Gradle build cache
- Upgrade kotlin plugins, Android minSDK to 30, and gradle to 8.4


Edit: It appears that even using the largest runners for kotin and swift
don't speed the builds up that much (~30%), but will substantially
increase our cost, so I've reverted them to free.

Fixes #2210
This commit is contained in:
Jamil
2023-10-07 08:07:24 -07:00
committed by GitHub
parent dde98f1985
commit da66264c84
14 changed files with 333 additions and 263 deletions

View File

@@ -24,7 +24,7 @@ jobs:
# less overhead to keep things in GH actions. See work on building these
# in GCP with Cloud Build: https://github.com/firezone/firezone/pull/2234
build-images:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04-firezone-16c
strategy:
matrix:
include:

View File

@@ -9,7 +9,7 @@ concurrency:
jobs:
unit-test:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04-firezone-4c
defaults:
run:
working-directory: ./elixir
@@ -414,7 +414,7 @@ jobs:
env.cache-name }}-${{ hashFiles('**/elixir/mix.lock') }}
acceptance-test:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04-firezone-4c
defaults:
run:
working-directory: ./elixir

View File

@@ -10,11 +10,9 @@ concurrency:
jobs:
# See rust.yml how we build, package and release connlib as an example
build:
runs-on: ${{ matrix.runs-on }}
strategy:
matrix:
runs-on:
- ubuntu-latest
# Builds are more IO-bound than CPU-bound so using a larger GitHub-hosted
# runner isn't worth it.
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./kotlin/android
@@ -31,7 +29,7 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
java-version: 17
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Create Local Properties File
@@ -43,7 +41,7 @@ jobs:
- name: Run linter
run: ./gradlew spotlessCheck
- name: Execute Gradle build
run: ./gradlew build
run: ./gradlew assembleRelease
- name: Run Test
run: ./gradlew testReleaseUnitTest
- name: Android Test Report

View File

@@ -14,6 +14,8 @@ jobs:
fail-fast: false
matrix:
runs-on:
# Builds are more IO-bound than CPU-bound so using a larger GitHub-hosted
# runner isn't worth it.
- os: macos-13
xcode-ver: "14.3"
target: