Skip to content

Commit

Permalink
Update CI scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
sstone committed Sep 16, 2024
1 parent 1493200 commit d2b908a
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 18 deletions.
24 changes: 17 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ jobs:
os: [ubuntu-latest, macOS-latest]
steps:
- name: Check out
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Cached Konan
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.konan
key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: ${{ runner.os }}-konan-
- name: Cached Gradle
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.gradle
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
Expand All @@ -35,9 +35,10 @@ jobs:
sudo apt-get update -y
sudo apt install -y libcurl4-gnutls-dev
- name: Set up JDK 11
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'adopt'
- name: Check
run: ./gradlew check
- name: Publish Linux
Expand All @@ -52,10 +53,19 @@ jobs:
run: |
mkdir -p maven-local/release
cp -r ~/.m2/repository/* maven-local/release
- name: Upload artifacts
uses: actions/upload-artifact@v2
- name: Upload linux artifacts
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: release-linux
path: |
maven-local
!maven-local/**/maven-metadata-local.xml
- name: Upload macos artifacts
if: matrix.os == 'macOS-latest'
uses: actions/upload-artifact@v4
with:
name: release
name: release-macos
path: |
maven-local
!maven-local/**/maven-metadata-local.xml
24 changes: 17 additions & 7 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ jobs:
os: [ubuntu-latest, macOS-latest]
steps:
- name: Check out
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Cached Konan
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.konan
key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: ${{ runner.os }}-konan-
- name: Cached Gradle
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.gradle
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
Expand All @@ -43,9 +43,10 @@ jobs:
sudo apt-get update -y
sudo apt install -y libcurl4-gnutls-dev
- name: Set up JDK 11
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'adopt'
- name: Check
run: ./gradlew check
- name: Publish Linux to Maven Local
Expand All @@ -60,10 +61,19 @@ jobs:
run: |
mkdir -p maven-local/snapshot
cp -r ~/.m2/repository/* maven-local/snapshot
- name: Upload artifacts
uses: actions/upload-artifact@v2
- name: Upload linux artifacts
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: snapshot-linux
path: |
maven-local
!maven-local/**/maven-metadata-local.xml
- name: Upload macos artifacts
uses: actions/upload-artifact@v4
if: matrix.os == 'macOS-latest'
with:
name: snapshot
name: snapshot-macos
path: |
maven-local
!maven-local/**/maven-metadata-local.xml
9 changes: 5 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@ jobs:

# 1 - checkout repositories
- name: Check out
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: 'true'

# 2 - setup cache and tools
- name: Cached Konan
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.konan
key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: ${{ runner.os }}-konan-
- name: Cached Gradle
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.gradle
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
Expand All @@ -54,9 +54,10 @@ jobs:
sudo apt-get update -y
sudo apt install -y libcurl4-gnutls-dev
- name: Set up JDK 11
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'adopt'

# 4 - tests
- name: Check with integration
Expand Down

0 comments on commit d2b908a

Please sign in to comment.