mirror of
https://github.com/rife2/bld
synced 2026-06-20 19:27:47 +02:00
Add dependencies caching for GitHub workflows
This commit is contained in:
parent
c521d6578f
commit
8f46145386
36
.github/workflows/bld.yml
vendored
36
.github/workflows/bld.yml
vendored
|
|
@ -94,19 +94,27 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source repository
|
- name: Checkout source repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
clean: true
|
clean: true
|
||||||
submodules: 'true'
|
submodules: 'true'
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Set up JDK ${{ matrix.java-version }}
|
- name: Set up JDK ${{ matrix.java-version }}
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v5
|
||||||
with:
|
with:
|
||||||
distribution: 'corretto'
|
distribution: 'corretto'
|
||||||
java-version: ${{ matrix.java-version }}
|
java-version: ${{ matrix.java-version }}
|
||||||
check-latest: true
|
check-latest: true
|
||||||
|
|
||||||
|
- name: Cache bld dependencies
|
||||||
|
id: cache-bld
|
||||||
|
uses: actions/cache@v5
|
||||||
|
with:
|
||||||
|
path: lib
|
||||||
|
key: ${{ runner.os }}-bld-java${{ matrix.java-version}}-lib
|
||||||
|
restore-keys: ${{ runner.os }}-bld-java${{ matrix.java-version}}-lib
|
||||||
|
|
||||||
- name: Download dependencies
|
- name: Download dependencies
|
||||||
run: ./bld clean download
|
run: ./bld clean download
|
||||||
|
|
||||||
|
|
@ -135,19 +143,27 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source repository
|
- name: Checkout source repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
clean: true
|
clean: true
|
||||||
submodules: 'true'
|
submodules: 'true'
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Set up JDK ${{ matrix.java-version }}
|
- name: Set up JDK ${{ matrix.java-version }}
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v5
|
||||||
with:
|
with:
|
||||||
distribution: 'corretto'
|
distribution: 'corretto'
|
||||||
java-version: ${{ matrix.java-version }}
|
java-version: ${{ matrix.java-version }}
|
||||||
check-latest: true
|
check-latest: true
|
||||||
|
|
||||||
|
- name: Cache bld dependencies
|
||||||
|
id: cache-bld
|
||||||
|
uses: actions/cache@v5
|
||||||
|
with:
|
||||||
|
path: lib
|
||||||
|
key: ${{ runner.os }}-bld-java${{ matrix.java-version}}-lib
|
||||||
|
restore-keys: ${{ runner.os }}-bld-java${{ matrix.java-version}}-lib
|
||||||
|
|
||||||
- name: Download dependencies
|
- name: Download dependencies
|
||||||
run: ./bld clean download
|
run: ./bld clean download
|
||||||
|
|
||||||
|
|
@ -174,19 +190,27 @@ jobs:
|
||||||
run: git config --global core.autocrlf input
|
run: git config --global core.autocrlf input
|
||||||
|
|
||||||
- name: Checkout source repository
|
- name: Checkout source repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
clean: true
|
clean: true
|
||||||
submodules: 'true'
|
submodules: 'true'
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Set up JDK ${{ matrix.java-version }}
|
- name: Set up JDK ${{ matrix.java-version }}
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v5
|
||||||
with:
|
with:
|
||||||
distribution: 'corretto'
|
distribution: 'corretto'
|
||||||
java-version: ${{ matrix.java-version }}
|
java-version: ${{ matrix.java-version }}
|
||||||
check-latest: true
|
check-latest: true
|
||||||
|
|
||||||
|
- name: Cache bld dependencies
|
||||||
|
id: cache-bld
|
||||||
|
uses: actions/cache@v5
|
||||||
|
with:
|
||||||
|
path: lib
|
||||||
|
key: ${{ runner.os }}-bld-java${{ matrix.java-version}}-lib
|
||||||
|
restore-keys: ${{ runner.os }}-bld-java${{ matrix.java-version}}-lib
|
||||||
|
|
||||||
- name: Download dependencies
|
- name: Download dependencies
|
||||||
run: .\bld.bat clean download
|
run: .\bld.bat clean download
|
||||||
|
|
||||||
|
|
|
||||||
11
.github/workflows/pages.yml
vendored
11
.github/workflows/pages.yml
vendored
|
|
@ -22,6 +22,7 @@ concurrency:
|
||||||
jobs:
|
jobs:
|
||||||
# Single deploy job since we're just deploying
|
# Single deploy job since we're just deploying
|
||||||
deploy:
|
deploy:
|
||||||
|
if: github.repository == 'rife2/bld'
|
||||||
environment:
|
environment:
|
||||||
name: github-pages
|
name: github-pages
|
||||||
url: ${{ steps.deployment.outputs.page_url }}
|
url: ${{ steps.deployment.outputs.page_url }}
|
||||||
|
|
@ -30,14 +31,14 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source repository
|
- name: Checkout source repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
clean: true
|
clean: true
|
||||||
submodules: 'true'
|
submodules: 'true'
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Set up JDK 17
|
- name: Set up JDK 17
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v5
|
||||||
with:
|
with:
|
||||||
distribution: 'corretto'
|
distribution: 'corretto'
|
||||||
java-version: 17
|
java-version: 17
|
||||||
|
|
@ -46,14 +47,14 @@ jobs:
|
||||||
run: ./bld clean download clean compile javadoc
|
run: ./bld clean download clean compile javadoc
|
||||||
|
|
||||||
- name: Setup Pages
|
- name: Setup Pages
|
||||||
uses: actions/configure-pages@v5
|
uses: actions/configure-pages@v6
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-pages-artifact@v3
|
uses: actions/upload-pages-artifact@v5
|
||||||
with:
|
with:
|
||||||
# Upload generated Javadocs repository
|
# Upload generated Javadocs repository
|
||||||
path: 'build/javadoc/'
|
path: 'build/javadoc/'
|
||||||
|
|
||||||
- name: Deploy to GitHub Pages
|
- name: Deploy to GitHub Pages
|
||||||
id: deployment
|
id: deployment
|
||||||
uses: actions/deploy-pages@v4
|
uses: actions/deploy-pages@v5
|
||||||
27
.github/workflows/purge-cache.yml
vendored
Normal file
27
.github/workflows/purge-cache.yml
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
name: purge-cache
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
confirm:
|
||||||
|
description: 'Type "yes" to confirm purging all bld caches'
|
||||||
|
required: true
|
||||||
|
default: 'no'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
clear-cache:
|
||||||
|
if: github.event.inputs.confirm == 'yes'
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
permissions:
|
||||||
|
actions: write
|
||||||
|
steps:
|
||||||
|
- name: Purge bld caches for ${{ runner.os }}
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: |
|
||||||
|
echo "Purging all caches with key ${{ runner.os }}-bld-"
|
||||||
|
gh cache delete --all --key "${{ runner.os }}-bld-"
|
||||||
|
echo "Done for ${{ runner.os }}"
|
||||||
|
|
@ -3,10 +3,10 @@ bld.downloadExtensionSources=true
|
||||||
bld.downloadLocation=
|
bld.downloadLocation=
|
||||||
bld.extension-antlr=com.uwyn.rife2:bld-antlr4:1.4.3
|
bld.extension-antlr=com.uwyn.rife2:bld-antlr4:1.4.3
|
||||||
bld.extension-archive=com.uwyn.rife2:bld-archive:0.6.3
|
bld.extension-archive=com.uwyn.rife2:bld-archive:0.6.3
|
||||||
bld.extension-reporter=com.uwyn.rife2:bld-junit-reporter:0.9.2
|
bld.extension-reporter=com.uwyn.rife2:bld-junit-reporter:1.2.0-SNAPSHOT
|
||||||
bld.extension-tests=com.uwyn.rife2:bld-tests-badge:1.6.3
|
bld.extension-tests=com.uwyn.rife2:bld-tests-badge:1.6.3
|
||||||
bld.javaOptions=
|
bld.javaOptions=
|
||||||
bld.javacOptions=
|
bld.javacOptions=
|
||||||
bld.repositories=MAVEN_CENTRAL,RIFE2_RELEASES
|
bld.repositories=MAVEN_CENTRAL,RIFE2_RELEASES,RIFE2_SNAPSHOTS
|
||||||
bld.sourceDirectories=core/src/bld/java
|
bld.sourceDirectories=core/src/bld/java
|
||||||
bld.version=2.3.0
|
bld.version=2.3.1-SNAPSHOT
|
||||||
Loading…
Reference in a new issue