-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: 整理Github Actions,支持发布二进制到Github Packages
同时修复二进制sample的构建,并加到PR检查中。 #462
- Loading branch information
Showing
20 changed files
with
266 additions
and
45 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: PR Check | ||
|
||
on: | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build-and-test-on-macos: | ||
runs-on: macos-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
- name: buildSdk | ||
run: ./gradlew buildSdk | ||
- name: lintSdk | ||
run: ./gradlew lintSdk | ||
- name: build sample/source | ||
run: ./gradlew build | ||
- name: unit test | ||
run: ./gradlew jvmTestSdk -S | ||
- name: run androidTestSdk on API 28 emulator | ||
uses: reactivecircus/android-emulator-runner@v2 | ||
with: | ||
api-level: 28 | ||
target: default | ||
arch: x86_64 | ||
profile: pixel_xl | ||
script: ./gradlew androidTestSdk | ||
build-on-windows: | ||
runs-on: windows-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
- name: buildSdk | ||
run: ./gradlew buildSdk | ||
- name: lintSdk | ||
run: ./gradlew lintSdk | ||
- name: build sample/source | ||
run: ./gradlew build | ||
build-samples: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
- name: build sample/maven/host-project | ||
working-directory: projects/sample/maven/host-project | ||
run: ./gradlew assemble | ||
- name: build sample/maven/manager-project | ||
working-directory: projects/sample/maven/manager-project | ||
run: ./gradlew assemble | ||
- name: build sample/maven/plugin-project | ||
working-directory: projects/sample/maven/plugin-project | ||
run: ./gradlew assemble | ||
- name: build sample/sunflower/host-project | ||
working-directory: projects/sample/sunflower/host-project | ||
run: ./gradlew assemble | ||
- name: build sample/sunflower/manager-project | ||
working-directory: projects/sample/sunflower/manager-project | ||
run: ./gradlew assemble | ||
- name: build sample/sunflower/plugin-project | ||
working-directory: projects/sample/sunflower/plugin-project | ||
run: ./gradlew assemble |
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,42 @@ | ||
name: Publish release | ||
|
||
on: | ||
release: | ||
types: | ||
- created | ||
|
||
jobs: | ||
build-and-test: | ||
runs-on: macos-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
- name: buildSdk | ||
run: ./gradlew buildSdk | ||
- name: lintSdk | ||
run: ./gradlew lintSdk | ||
- name: build sample/source | ||
run: ./gradlew build | ||
- name: unit test | ||
run: ./gradlew jvmTestSdk -S | ||
- name: run androidTestSdk on API 28 emulator | ||
uses: reactivecircus/android-emulator-runner@v2 | ||
with: | ||
api-level: 28 | ||
target: default | ||
arch: x86_64 | ||
profile: pixel_xl | ||
script: ./gradlew androidTestSdk | ||
publish: | ||
needs: build-and-test | ||
runs-on: macos-latest | ||
env: | ||
PUBLISH_RELEASE: true | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- name: Inject slug/short variables | ||
uses: rlespinasse/[email protected] | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
- name: publish | ||
run: ./gradlew publish |
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 |
---|---|---|
@@ -1,13 +1,11 @@ | ||
name: Android CI | ||
name: Publish snapshot | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
test: | ||
build-and-test: | ||
runs-on: macos-latest | ||
steps: | ||
- name: checkout | ||
|
@@ -28,4 +26,16 @@ jobs: | |
arch: x86_64 | ||
profile: pixel_xl | ||
script: ./gradlew androidTestSdk | ||
|
||
publish: | ||
needs: build-and-test | ||
runs-on: macos-latest | ||
env: | ||
PUBLISH_RELEASE: false | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- name: Inject slug/short variables | ||
uses: rlespinasse/[email protected] | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
- name: publish | ||
run: ./gradlew publish |
This file was deleted.
Oops, something went wrong.
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
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
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
Oops, something went wrong.