Skip to content

Commit

Permalink
Move checks to different CI workflow
Browse files Browse the repository at this point in the history
Don't appear to have enough resources in a GitHub runner to run all
tasks in a single runner.

So split them out.

"check" (which runs all lint and tests) can run over every variant on
a single runner, and includes testing the CLI tools.

"build" (which, per variant, does not run tests) doesn't run the tests,
but verifies the code can be built (ignores CLI tools).
  • Loading branch information
nikclayton committed Apr 15, 2024
1 parent 2447b81 commit 99d4f07
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 60 deletions.
11 changes: 1 addition & 10 deletions .github/workflows/ci.yml → .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,5 @@ jobs:
with:
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}

- name: ktlint
run: ./gradlew clean ktlintCheck

- name: Regular lint ${{ matrix.color }}${{ matrix.store }}Debug
run: ./gradlew app:lint${{ matrix.color }}${{ matrix.store }}Debug

- name: Test ${{ matrix.color }}${{ matrix.store }}DebugUnitTest checks:test
run: ./gradlew app:test${{ matrix.color }}${{ matrix.store }}DebugUnitTest checks:test

- name: Build ${{ matrix.color }}${{ matrix.store }}Debug
run: ./gradlew app:build${{ matrix.color }}${{ matrix.store }}Debug
run: ./gradlew --no-configuration-cache build{{ matrix.color }}${{ matrix.store }}Debug
17 changes: 3 additions & 14 deletions .github/workflows/ci-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ permissions: read-all

jobs:
build:
name: Build
name: Check
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -33,18 +33,7 @@ jobs:
with:
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}

# Increase the amount of available swap space to prevent OOM.
- name: Configure swap
run: |
sudo swapon --show
sudo swapoff -a
sudo fallocate -l 8G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo swapon --show
# Disable the configuration cache; it's not restored, or saved at the end, so this
# removes any overhead trying to load or save it.
- name: Check and assemble everything
run: ./gradlew --no-configuration-cache build
- name: Check everything
run: ./gradlew --no-configuration-cache check
36 changes: 0 additions & 36 deletions .github/workflows/ktlint.yml

This file was deleted.

0 comments on commit 99d4f07

Please sign in to comment.