Skip to content

Commit

Permalink
Github Actions
Browse files Browse the repository at this point in the history
* Migrate to Github Actions
* Run integration tests on macos, linux, windows
* Rebuild yarn.lock because it was breaking
* Consume prebuilt, statically linked, conformance runner artifacts from an upstream project instead of checking them in
* Upgrade Gradle to 8.7-rc because of yet another file locking issue on windows (gradle/gradle#25752)
  • Loading branch information
ogolberg authored Mar 14, 2024
1 parent 842e3be commit 76d8dd7
Show file tree
Hide file tree
Showing 12 changed files with 168 additions and 2,298 deletions.
178 changes: 0 additions & 178 deletions .circleci/config.yml

This file was deleted.

11 changes: 11 additions & 0 deletions .github/actions/gradle-cache/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Gradle cache
description: Gradle caching logic shared across builds
runs:
using: composite
steps:
- uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ hashFiles('gradle/libs.versions.toml', 'gradle/wrapper/gradle-wrapper.properties') }}
57 changes: 57 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Build

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/gradle-cache
- name: Set up java
uses: actions/setup-java@v3
with:
distribution: corretto
java-version: 17
- name: Set up js stuff
run: npm install [email protected] [email protected]
- name: Build and test
run: ./gradlew clean check publishToIntegrationRepository --stacktrace --no-daemon
- uses: actions/upload-artifact@v4
with:
name: integration-repository
path: build/repos/integration

integration:
needs: build
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
kotlin: [ 1.8.22, 1.9.20 ]
jdk: [ 11, 17 ]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/gradle-cache
- name: Set up java
uses: actions/setup-java@v3
with:
distribution: corretto
java-version: ${{ matrix.jdk }}
- uses: actions/download-artifact@v4
with:
name: integration-repository
path: build/repos/integration
- name: Build and test
run: ./gradlew "-Dkotlin.version=${{ matrix.kotlin }}" clean build --stacktrace --no-daemon
working-directory: gradle-plugin-integration-test
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Release

on:
push:
tags:
- "[0-9]+\.[0-9]+\.[0-9A-Za-z-\.]+"

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: ./.github/actions/gradle-cache
- name: Set up java
uses: actions/setup-java@v3
with:
distribution: corretto
java-version: 17
- name: Publish
run: publishAllPublicationsToMavenCentral publishPlugins --no-configuration-cache --no-stacktrace
env:
PGP_KEY: ${{ secrets.PGP_KEY }}
PGP_PASSWORD: ${{ secrets.PGP_PASSWORD }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSSRH_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSSRH_PASSWORD }}
GRADLE_PORTAL_PUBLISH_KEY: ${{ secrets.GRADLE_PORTAL_PUBLISH_KEY }}
GRADLE_PORTAL_PUBLISH_SECRET: ${{ secrets.GRADLE_PORTAL_PUBLISH_SECRET }}
GRADLE_OPTS: "-Dorg.gradle.daemon=false -Dorg.gradle.internal.http.socketTimeout=120000 -Dorg.gradle.internal.network.retry.max.attempts=1 -Dorg.gradle.internal.publish.checksums.insecure=true"
Loading

0 comments on commit 76d8dd7

Please sign in to comment.