Skip to content

Commit 0d95b54

Browse files
committed
Update .github
1 parent 3e91128 commit 0d95b54

File tree

4 files changed

+99
-27
lines changed

4 files changed

+99
-27
lines changed

.github/clean-up.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh
2+
3+
rm -rf "$HOME/.ivy2/local" || true
4+
find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete || true
5+
find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete || true
6+
find $HOME/.sbt -name "*.lock" -delete || true

.github/workflows/bump.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: Bump Version
22
on:
33
workflow_dispatch:
44
schedule:
5-
- cron: '0 0 * * *'
5+
- cron: '0 0 * * *'
66
jobs:
77
bump-version:
8-
runs-on: ubuntu-20.04
8+
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/[email protected]
1111
with:
@@ -17,6 +17,7 @@ jobs:
1717
uses: mathieudutour/[email protected]
1818
with:
1919
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
20+
default_bump: patch
2021
- name: Create a GitHub release
2122
uses: actions/create-release@v1
2223
env:
@@ -25,3 +26,4 @@ jobs:
2526
tag_name: ${{ steps.tag_version.outputs.new_tag }}
2627
release_name: Release ${{ steps.tag_version.outputs.new_tag }}
2728
body: ${{ steps.tag_version.outputs.changelog }}
29+

.github/workflows/ci.yml

Lines changed: 62 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
name: CI
22
on:
33
push:
4-
branches: [ main ]
4+
branches: [main]
55
pull_request:
6-
branches: [ main ]
6+
branches: [main]
77
schedule:
8-
- cron: '0 0 * * *'
8+
- cron: '0 0 * * *'
99
jobs:
1010
build:
11-
runs-on: ubuntu-20.04
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
os: [ ubuntu-latest ]
15+
16+
scala: [ 2.11.12, 2.12.13, 2.13.5 ]
17+
runs-on: ${{ matrix.os }}
1218
env:
1319
JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
1420
JVM_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
@@ -20,15 +26,57 @@ jobs:
2026
fetch-depth: 0
2127
- uses: olafurpg/setup-scala@v10
2228
with:
23-
java-version: "[email protected]"
29+
java-version: ${{ matrix.jdk }}
2430
- uses: coursier/cache-action@v5
25-
- run: sbt -v scalafmtCheckAll
26-
- run: sbt -v +compile
27-
- run: sbt -v +test
31+
- run: sbt -v ++${{ matrix.scala }} compile
2832
- name: clean up
29-
run: |
30-
rm -rf "$HOME/.ivy2/local" || true
31-
find $HOME/Library/Caches/Coursier/v1 -name "ivydata-*.properties" -delete || true
32-
find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete || true
33-
find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete || true
34-
find $HOME/.sbt -name "*.lock" -delete || true
33+
run: "${GITHUB_WORKSPACE}/.github/clean-up.sh"
34+
test:
35+
strategy:
36+
fail-fast: false
37+
matrix:
38+
os: [ ubuntu-latest ]
39+
40+
scala: [ 2.11.12, 2.12.13, 2.13.5 ]
41+
runs-on: ${{ matrix.os }}
42+
needs: build
43+
env:
44+
JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
45+
JVM_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
46+
AWS_REGION: ap-northeast-1
47+
TEST_TIME_FACTOR: 5
48+
steps:
49+
- uses: actions/[email protected]
50+
with:
51+
fetch-depth: 0
52+
- uses: olafurpg/setup-scala@v10
53+
with:
54+
java-version: ${{ matrix.jdk }}
55+
- uses: coursier/cache-action@v5
56+
- uses: olafurpg/setup-gpg@v3
57+
- run: sbt -v ++${{ matrix.scala }} test
58+
- name: clean up
59+
run: "${GITHUB_WORKSPACE}/.github/clean-up.sh"
60+
snapshot:
61+
runs-on: ubuntu-latest
62+
needs: test
63+
env:
64+
JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
65+
JVM_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
66+
steps:
67+
- uses: actions/[email protected]
68+
with:
69+
fetch-depth: 0
70+
- uses: olafurpg/setup-scala@v10
71+
with:
72+
java-version: "[email protected]"
73+
- uses: coursier/cache-action@v5
74+
- uses: olafurpg/setup-gpg@v3
75+
- run: sbt -v ci-release
76+
env:
77+
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
78+
PGP_SECRET: ${{ secrets.PGP_SECRET }}
79+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
80+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
81+
- name: clean up
82+
run: "${GITHUB_WORKSPACE}/.github/clean-up.sh"

.github/workflows/release.yml

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,54 @@
11
name: Release
22
on:
33
push:
4-
branches: [ main ]
54
tags:
65
- v[1-9]+.[0-9]+.[0-9]+
76
jobs:
8-
release:
9-
runs-on: ubuntu-20.04
7+
test:
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
os: [ ubuntu-latest ]
12+
13+
scala: [ 2.11.12, 2.12.13, 2.13.5 ]
14+
runs-on: ${{ matrix.os }}
1015
env:
1116
JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
1217
JVM_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
1318
AWS_REGION: ap-northeast-1
1419
TEST_TIME_FACTOR: 5
20+
steps:
21+
- uses: actions/[email protected]
22+
with:
23+
fetch-depth: 0
24+
- uses: olafurpg/setup-scala@v10
25+
with:
26+
java-version: ${{ matrix.jdk }}
27+
- uses: coursier/cache-action@v5
28+
- run: sbt -v ++${{ matrix.scala }} test
29+
- name: clean up
30+
run: "${GITHUB_WORKSPACE}/.github/clean-up.sh"
31+
release:
32+
runs-on: ubuntu-latest
33+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
34+
env:
35+
JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
36+
JVM_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
1537
steps:
1638
- uses: actions/[email protected]
1739
with:
1840
fetch-depth: 0
41+
ref: ${{ github.event.workflow_run.head_branch }}
1942
- uses: olafurpg/setup-scala@v10
2043
with:
2144
java-version: "[email protected]"
2245
- uses: coursier/cache-action@v5
2346
- uses: olafurpg/setup-gpg@v3
24-
- run: sbt -v scalafmtCheckAll
25-
- run: sbt -v +test
2647
- run: sbt -v ci-release
2748
env:
2849
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
2950
PGP_SECRET: ${{ secrets.PGP_SECRET }}
3051
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
3152
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
3253
- name: clean up
33-
run: |
34-
rm -rf "$HOME/.ivy2/local" || true
35-
find $HOME/Library/Caches/Coursier/v1 -name "ivydata-*.properties" -delete || true
36-
find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete || true
37-
find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete || true
38-
find $HOME/.sbt -name "*.lock" -delete || true
54+
run: "${GITHUB_WORKSPACE}/.github/clean-up.sh"

0 commit comments

Comments
 (0)