Skip to content

Commit

Permalink
Update PR build (#225)
Browse files Browse the repository at this point in the history
* Update PR build

* Make UI parallel

* Fix UI, and add if success

* Don't make build tasks depends on check-signature

* Renaming

* Working on build the sample

* Add concurrency cancel in progress

* More spacing

* publish jobs not depend on build-ui

* check sign depends only on sample

* Make fake publish not depends on sign
  • Loading branch information
alorma authored Mar 1, 2024
1 parent 663df98 commit 836f0a6
Show file tree
Hide file tree
Showing 2 changed files with 277 additions and 11 deletions.
102 changes: 91 additions & 11 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
check-sign:
name: Check signature - PR
build-storage-base:
name: Build storage base - PR
runs-on: macos-latest
steps:
- name: Check out code
Expand All @@ -19,32 +23,106 @@ jobs:
distribution: adopt
java-version: 17

- name: Sign release
run: ./gradlew signReleasePublication -Psigning.secretKeyRingFile=../secrets.gpg -Psigning.keyId=${{ secrets.GPG_KEY_NAME }} -Psigning.password=${{ secrets.GPG_PASSPHRASE }}
- name: Build storage base - PR
run: ./gradlew :compose-settings-storage-base:build

build:
name: Build - PR
needs: [ check-sign ]
build-ui:
name: Build ui - PR
runs-on: macos-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 17

- name: Build ui - PR
run: ./gradlew :compose-settings-ui:build

build-storage-memory:
name: Build storage memory - PR
if: ${{ success() }}
needs: [ build-storage-base ]
runs-on: macos-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 17

- name: Build storage memory - PR
run: ./gradlew :compose-settings-storage-memory:build

build-storage-disk:
name: Build storage disk - PR
if: ${{ success() }}
needs: [ build-storage-base ]
runs-on: macos-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 17

- name: Build
run: ./gradlew build
run: ./gradlew :compose-settings-storage-disk:build

build-sample:
name: Build sample - PR
if: ${{ success() }}
needs: [ build-storage-memory, build-storage-disk, build-ui ]
runs-on: macos-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 17

- name: Build sample - PR
run: ./gradlew :composeApp:build

check-sign:
name: Check signature - PR
if: ${{ success() }}
needs: [build-sample ]
runs-on: macos-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 17

- name: Check signature - PR
run: ./gradlew signReleasePublication -Psigning.secretKeyRingFile=../secrets.gpg -Psigning.keyId=${{ secrets.GPG_KEY_NAME }} -Psigning.password=${{ secrets.GPG_PASSPHRASE }}

fake-publish:
name: Fake publish - PR
needs: [ check-sign, build ]
if: ${{ success() }}
needs: [ build-sample ]
runs-on: macos-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v4
with:
Expand All @@ -56,16 +134,18 @@ jobs:

publish-dry:
name: Dry run publish - PR
needs: [ check-sign, build ]
if: ${{ success() }}
needs: [ check-sign, build-sample ]
runs-on: macos-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 17

- name: Publish to MavenCentral
- name: Publish to MavenCentral (dry)
run: ./gradlew publishAndReleaseToMavenCentral --no-configuration-cache --max-workers 1 -Psigning.secretKeyRingFile=../secrets.gpg -Psigning.keyId=${{ secrets.GPG_KEY_NAME }} -Psigning.password=${{ secrets.GPG_PASSPHRASE }} -PmavenCentralUsername=${{ secrets.OSSRH_USERNAME }} -PmavenCentralPassword=${{ secrets.OSSRH_PASSWORD }} --dry-run
186 changes: 186 additions & 0 deletions tasks.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
Configuration on demand is an incubating feature.
Type-safe project accessors is an incubating feature.

> Task :composeApp:tasks

------------------------------------------------------------
Tasks runnable from project ':composeApp' - Commonized CInterop dependencies for source set iosTest with targets: '(ios_arm64, ios_simulator_arm64, ios_x64)'.
------------------------------------------------------------

Android tasks
-------------
androidDependencies - Displays the Android dependencies of the project.
signingReport - Displays the signing info for the base and test modules
sourceSets - Prints out all the source sets defined in this project.

Build tasks
-----------
allMetadataJar - Assembles a jar archive containing the metadata for all Kotlin source sets.
assemble - Assemble main outputs for all the variants.
assembleAndroidTest - Assembles all the Test applications.
build - Assembles and tests this project.
buildDependents - Assembles and tests this project and all projects that depend on it.
buildKotlinToolingMetadata - Build metadata json file containing information about the used Kotlin tooling
buildNeeded - Assembles and tests this project and all projects it depends on.
bundle - Assemble bundles for all the variants.
clean - Deletes the build directory.
cleanAllTests - Deletes all the test results.
compileAppleMainKotlinMetadata - Compiles a klibrary from the 'appleMain' compilation in target 'metadata'.
compileDebugAndroidTestSources
compileDebugSources
compileDebugUnitTestSources
compileIosMainKotlinMetadata - Compiles a klibrary from the 'iosMain' compilation in target 'metadata'.
compileKotlinIosArm64 - Compiles a klibrary from the 'main' compilation in target 'iosArm64'.
compileKotlinIosSimulatorArm64 - Compiles a klibrary from the 'main' compilation in target 'iosSimulatorArm64'.
compileKotlinIosX64 - Compiles a klibrary from the 'main' compilation in target 'iosX64'.
compileNativeMainKotlinMetadata - Compiles a klibrary from the 'nativeMain' compilation in target 'metadata'.
compileReleaseSources
compileReleaseUnitTestSources
compileTestKotlinIosArm64 - Compiles a klibrary from the 'test' compilation in target 'iosArm64'.
compileTestKotlinIosSimulatorArm64 - Compiles a klibrary from the 'test' compilation in target 'iosSimulatorArm64'.
compileTestKotlinIosX64 - Compiles a klibrary from the 'test' compilation in target 'iosX64'.
desktopJar - Assembles an archive containing the main classes.
desktopMainClasses - Assembles outputs for compilation 'main' of target 'desktop'
desktopSourcesJar - Assembles a jar archive containing the sources of target 'desktop'.
desktopTestClasses - Assembles outputs for compilation 'test' of target 'desktop'
embedAndSignAppleFrameworkForXcode - Embed and sign framework as requested by Xcode's environment variables
iosArm64Binaries - Assembles outputs for target 'iosArm64'.
iosArm64MainBinaries - Links all binaries for compilation 'main' of target 'iosArm64'.
iosArm64MainKlibrary - Assembles outputs for compilation 'main' of target 'iosArm64'
iosArm64MetadataJar - Assembles Kotlin metadata of target 'iosArm64'.
iosArm64SourcesJar - Assembles a jar archive containing the sources of target 'iosArm64'.
iosArm64TestBinaries - Links all binaries for compilation 'test' of target 'iosArm64'.
iosArm64TestKlibrary - Assembles outputs for compilation 'test' of target 'iosArm64'
iosSimulatorArm64Binaries - Assembles outputs for target 'iosSimulatorArm64'.
iosSimulatorArm64MainBinaries - Links all binaries for compilation 'main' of target 'iosSimulatorArm64'.
iosSimulatorArm64MainKlibrary - Assembles outputs for compilation 'main' of target 'iosSimulatorArm64'
iosSimulatorArm64MetadataJar - Assembles Kotlin metadata of target 'iosSimulatorArm64'.
iosSimulatorArm64SourcesJar - Assembles a jar archive containing the sources of target 'iosSimulatorArm64'.
iosSimulatorArm64TestBinaries - Links all binaries for compilation 'test' of target 'iosSimulatorArm64'.
iosSimulatorArm64TestKlibrary - Assembles outputs for compilation 'test' of target 'iosSimulatorArm64'
iosX64Binaries - Assembles outputs for target 'iosX64'.
iosX64MainBinaries - Links all binaries for compilation 'main' of target 'iosX64'.
iosX64MainKlibrary - Assembles outputs for compilation 'main' of target 'iosX64'
iosX64MetadataJar - Assembles Kotlin metadata of target 'iosX64'.
iosX64SourcesJar - Assembles a jar archive containing the sources of target 'iosX64'.
iosX64TestBinaries - Links all binaries for compilation 'test' of target 'iosX64'.
iosX64TestKlibrary - Assembles outputs for compilation 'test' of target 'iosX64'
linkDebugFrameworkIosArm64 - Links a framework 'debugFramework' for a target 'iosArm64'.
linkDebugFrameworkIosSimulatorArm64 - Links a framework 'debugFramework' for a target 'iosSimulatorArm64'.
linkDebugFrameworkIosX64 - Links a framework 'debugFramework' for a target 'iosX64'.
linkDebugTestIosArm64 - Links a test executable 'debugTest' for a target 'iosArm64'.
linkDebugTestIosSimulatorArm64 - Links a test executable 'debugTest' for a target 'iosSimulatorArm64'.
linkDebugTestIosX64 - Links a test executable 'debugTest' for a target 'iosX64'.
linkIosArm64 - Links all binaries for target 'iosArm64'.
linkIosSimulatorArm64 - Links all binaries for target 'iosSimulatorArm64'.
linkIosX64 - Links all binaries for target 'iosX64'.
linkReleaseFrameworkIosArm64 - Links a framework 'releaseFramework' for a target 'iosArm64'.
linkReleaseFrameworkIosSimulatorArm64 - Links a framework 'releaseFramework' for a target 'iosSimulatorArm64'.
linkReleaseFrameworkIosX64 - Links a framework 'releaseFramework' for a target 'iosX64'.
metadataAppleMainClasses - Assembles outputs for compilation 'appleMain' of target 'metadata'
metadataCommonMainClasses - Assembles outputs for compilation 'commonMain' of target 'metadata'
metadataIosMainClasses - Assembles outputs for compilation 'iosMain' of target 'metadata'
metadataMainClasses - Assembles outputs for compilation 'main' of target 'metadata'
metadataNativeMainClasses - Assembles outputs for compilation 'nativeMain' of target 'metadata'
metadataSourcesJar - Assembles a jar archive containing the sources of target 'metadata'.

Compose desktop tasks
---------------------
checkRuntime
createDistributable
createReleaseDistributable
createRuntimeImage
notarizeDmg
notarizeReleaseDmg
package
packageDeb
packageDistributionForCurrentOS
packageDmg
packageMsi
packageReleaseDeb
packageReleaseDistributionForCurrentOS
packageReleaseDmg
packageReleaseMsi
packageReleaseUberJarForCurrentOS
packageUberJarForCurrentOS
prepareAppResources
proguardReleaseJars
run
runDistributable
runRelease
runReleaseDistributable
suggestRuntimeModules
unpackDefaultComposeDesktopJvmApplicationResources

Help tasks
----------
buildEnvironment - Displays all buildscript dependencies declared in project ':composeApp'.
dependencies - Displays all dependencies declared in project ':composeApp'.
dependencyInsight - Displays the insight into a specific dependency in project ':composeApp'.
help - Displays a help message.
javaToolchains - Displays the detected java toolchains.
kotlinDslAccessorsReport - Prints the Kotlin code for accessing the currently available project extensions and conventions.
outgoingVariants - Displays the outgoing variants of project ':composeApp'.
projects - Displays the sub-projects of project ':composeApp'.
properties - Displays the properties of project ':composeApp'.
resolvableConfigurations - Displays the configurations that can be resolved in project ':composeApp'.
tasks - Displays the tasks runnable from project ':composeApp'.

Ide tasks
---------
resolveIdeDependencies - Debugging/Diagnosing task that will resolve dependencies for the IDE

Install tasks
-------------
installDebug - Installs the Debug build.
installDebugAndroidTest - Installs the android (on device) tests for the Debug build.
uninstallAll - Uninstall all applications.
uninstallDebug - Uninstalls the Debug build.
uninstallDebugAndroidTest - Uninstalls the android (on device) tests for the Debug build.
uninstallRelease - Uninstalls the Release build.

Interop tasks
-------------
commonize - Aggregator task for all c-interop & Native distribution commonizer tasks
commonizeCInterop - Invokes the commonizer on c-interop bindings of the project
runCommonizer - [Deprecated: Use 'commonize' instead]

Run tasks
---------
desktopRun - Jvm Run task for target 'desktop' and compilation 'main'. This task can act as carrier for the IDE to execute jvm based code

Verification tasks
------------------
allTests - Runs the tests for all targets and create aggregated report
check - Runs all checks.
checkJetifier - Checks whether Jetifier is needed for the current project
checkKotlinGradlePluginConfigurationErrors - Checks that Kotlin Gradle Plugin hasn't reported project configuration errors, failing otherwise. This task always runs before compileKotlin* or similar tasks.
connectedAndroidTest - Installs and runs instrumentation tests for all flavors on connected devices.
connectedCheck - Runs all device checks on currently connected devices.
connectedDebugAndroidTest - Installs and runs the tests for debug on connected devices.
desktopTest - Runs the tests of the test test run.
deviceAndroidTest - Installs and runs instrumentation tests using all Device Providers.
deviceCheck - Runs all device checks using Device Providers and Test Servers.
iosSimulatorArm64Test - Executes Kotlin/Native unit tests for target iosSimulatorArm64.
iosX64Test - Executes Kotlin/Native unit tests for target iosX64.
lint - Runs lint on the default variant.
lintDebug - Print text output from the corresponding lint report task
lintFix - Runs lint on the default variant and applies any safe suggestions to the source code.
lintRelease - Print text output from the corresponding lint report task
lintVitalRelease - Print text output from the corresponding lint report task
test - Run unit tests for all variants.
testDebugUnitTest - Run unit tests for the debug build.
testReleaseUnitTest - Run unit tests for the release build.
updateLintBaseline - Updates the lint baseline using the default variant.

Rules
-----
Pattern: clean<TaskName>: Cleans the output files of a task.
Pattern: build<ConfigurationName>: Assembles the artifacts of a configuration.

To see all tasks and more detail, run gradlew tasks --all

To see more detail about a task, run gradlew help --task <task>

BUILD SUCCESSFUL in 1s
1 actionable task: 1 executed

0 comments on commit 836f0a6

Please sign in to comment.