-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #833 from splendo/ci-example
CI example compilation and xcode 16 / macos-15
- Loading branch information
Showing
11 changed files
with
205 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: 'Setup macOS workspace reusable workflow' | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
gradleTask: | ||
required: false | ||
type: string | ||
project: | ||
required: false | ||
type: string | ||
projectBlacklist: | ||
required: false | ||
type: string | ||
|
||
outputs: | ||
projects: | ||
description: "Gradle projects that do not dependent on another project or have other projects dependent on them" | ||
value: ${{ jobs.setup.outputs.projects }} | ||
jobs: | ||
setup: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
outputs: | ||
projects: ${{ steps.envFile.outputs.projects }} | ||
kotlinVersion: ${{ steps.kotlinVersion.outputs.kotlinVersion }} | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Enable KVM group perms | ||
run: | | ||
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | ||
sudo udevadm control --reload-rules | ||
sudo udevadm trigger --name-match=kvm | ||
- name: setup tools and enable Gradle cache writing | ||
uses: ./.github/workflows/setup_tools_linux/ | ||
with: | ||
gradle-cache-read-only: 'false' | ||
restore-workspace-cache: 'false' | ||
project: ${{ inputs.project }} | ||
|
||
- name: generate file with projects for build matrix | ||
if: inputs.project == '' | ||
run: ./gradlew generateNonDependentProjectsFile -PgenerateNonDependentProjectsFile.blacklist=${{ inputs.projectBlacklist }} | ||
|
||
- name: generate file with single requested project for build matrix | ||
if: inputs.project != '' | ||
run: echo "projects=['${{ inputs.project }}']" > non_dependent_projects.properties | ||
|
||
- name: show projects for Matrix | ||
run: cat non_dependent_projects.properties | ||
|
||
- name: load projects for build matrix | ||
uses: cardinalby/export-env-action@v2 | ||
id: envFile | ||
with: | ||
envFile: 'non_dependent_projects.properties' | ||
export: 'false' | ||
|
||
- name: run custom Gradle task for all projects | ||
if: inputs.project == '' | ||
run: ./gradlew ${{ inputs.gradleTask }} | ||
|
||
- name: run custom Gradle task for single project | ||
if: inputs.project != '' | ||
run: ./gradlew :${{ inputs.project }}:${{ inputs.gradleTask }} | ||
|
||
- name: Make cache of workspace | ||
uses: actions/cache/save@v4 | ||
id: store-build | ||
with: | ||
path: | | ||
./* | ||
!/.gradle | ||
key: build-linux-${{ github.sha }}-${{ inputs.project }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: "setup tools and caching for macOS workspace" | ||
description: "setup tools and caching for macOS workspace" | ||
inputs: | ||
gradle-cache-read-only: | ||
default: 'true' | ||
description: Updates gradle cache after actions if not read-only | ||
restore-workspace-cache: | ||
default: 'true' | ||
description: Whether to restore the workspace cache | ||
project: | ||
required: false | ||
description: single project to run | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
|
||
- name: set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 17 | ||
|
||
- name: Gradle cache | ||
uses: gradle/actions/setup-gradle@v4 | ||
with: | ||
cache-read-only: ${{ inputs.gradle-cache-read-only }} | ||
gradle-home-cache-includes: | | ||
caches | ||
notifications | ||
- name: Make cache of workspace | ||
uses: actions/cache/restore@v4 | ||
if: ${{ inputs.restore-workspace-cache != 'false' }} | ||
id: restore-build | ||
with: | ||
path: | | ||
./* | ||
!/.gradle | ||
key: build-linux-${{ github.sha }}-${{ inputs.project }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,4 +29,10 @@ publishing { | |
artifactId = "catalog" | ||
} | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
subprojects.forEach { project -> | ||
kover(project) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters