mirror of
https://gh-proxy.com/github.com/actions/setup-java.git
synced 2026-10-02 18:46:08 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dd06d9cba3 | ||
|
|
59b3450628 | ||
|
|
b96213d9d2 | ||
|
|
1dbac3c9e1 | ||
|
|
11741d6cfa | ||
|
|
ff99aa1c87 | ||
|
|
416c6d1e8a | ||
|
|
5f75b27283 | ||
|
|
a42a52cfb5 | ||
|
|
fb4abd7a70 | ||
|
|
d4f69b3990 | ||
|
|
7d5d4a7f19 | ||
|
|
f974fff346 | ||
|
|
e96da06a44 | ||
|
|
3487f54461 | ||
|
|
d2bb5a81bf | ||
|
|
a52a3de678 | ||
|
|
d17a685945 | ||
|
|
0b0c385478 | ||
|
|
143564d5b9 | ||
|
|
5580b78434 | ||
|
|
4fbd0bd19d | ||
|
|
d0e61fe743 | ||
|
|
fb58a661f3 | ||
|
|
2b61aea53d | ||
|
|
634b0f0d18 | ||
|
|
f4bfb3ddea | ||
|
|
ab597f914a | ||
|
|
ef9440a2b8 | ||
|
|
2dd851a56a | ||
|
|
885218c5e4 | ||
|
|
2924169ccc | ||
|
|
955f34f16f | ||
|
|
7a9a8b1dcc | ||
|
|
f48de5f4c7 | ||
|
|
881ee1636f | ||
|
|
60b1ab8234 | ||
|
|
dd7dc10522 | ||
|
|
7c6f629e2f | ||
|
|
d72315472c | ||
|
|
536de9e5ba | ||
|
|
9a8c300417 | ||
|
|
5827477733 | ||
|
|
3cc3643700 | ||
|
|
6937f5eb31 | ||
|
|
0b56831a10 | ||
|
|
9f43141311 | ||
|
|
ec4dbbe20d | ||
|
|
62f345fa33 | ||
|
|
bcd3ba3d32 | ||
|
|
27f2c62824 | ||
|
|
19c23b379e | ||
|
|
6e26972896 | ||
|
|
5894ef6b27 | ||
|
|
e1ce3a3428 | ||
|
|
ce75feb3d3 | ||
|
|
382d4b753d | ||
|
|
24d1ce4c2b | ||
|
|
1c3b3d28f0 | ||
|
|
0b0bd25927 | ||
|
|
089b010dc8 | ||
|
|
e07d36bbdd | ||
|
|
69304e5bab | ||
|
|
f75542ba2b | ||
|
|
c59dceb0cd | ||
|
|
8f48118d89 | ||
|
|
c79143eaae | ||
|
|
77c695c0d0 | ||
|
|
7b26641a55 | ||
|
|
e08df439e0 | ||
|
|
cd3b6000e4 | ||
|
|
c3d7ccbf81 | ||
|
|
46f6294045 | ||
|
|
e40a8e0642 | ||
|
|
6e2e32e729 | ||
|
|
38fa86f9e4 | ||
|
|
ecd5f809c2 | ||
|
|
4a24efdcc9 | ||
|
|
cc8cdedf67 | ||
|
|
4b0728bd0d | ||
|
|
7d485884af | ||
|
|
c3568cc9d9 | ||
|
|
81c13a41f9 | ||
|
|
3c85b14378 | ||
|
|
80c368b720 | ||
|
|
cd57b95697 | ||
|
|
7a475d86d1 | ||
|
|
92f9362dd0 | ||
|
|
71cfe8e0ed | ||
|
|
eb6157cd13 | ||
|
|
2adeb10550 | ||
|
|
23f8c419c6 | ||
|
|
6f7d7a6eb1 | ||
|
|
2301a55b6d | ||
|
|
2789aa9170 | ||
|
|
28fb8cb06b | ||
|
|
174d4b5609 | ||
|
|
86ce8e6cc8 | ||
|
|
90be2728bc | ||
|
|
3157986b3f | ||
|
|
548a822bee | ||
|
|
f848fd1976 | ||
|
|
fe9b749bcb | ||
|
|
4db08ef6bf | ||
|
|
7dbccc66ee | ||
|
|
8a3e8157a1 | ||
|
|
f7121373a9 | ||
|
|
2a07c83aea | ||
|
|
d3530c1eb4 | ||
|
|
0f481fcb61 | ||
|
|
c4922bf809 | ||
|
|
6657b99340 | ||
|
|
a50fdccef1 | ||
|
|
77ee41d00e | ||
|
|
0765b158bf | ||
|
|
c712b2fb55 | ||
|
|
733efaeaca | ||
|
|
6c4d4a5025 | ||
|
|
324b33387d | ||
|
|
2e73c8f8cd | ||
|
|
b150355f04 | ||
|
|
e9339ddc84 | ||
|
|
bf1fac860b | ||
|
|
aff09c2230 | ||
|
|
c5f2f2ea96 | ||
|
|
623c707d77 | ||
|
|
1bcf9fb12c | ||
|
|
fa2c6508d1 | ||
|
|
1d56e31dbb | ||
|
|
1d25252804 | ||
|
|
668c1ea991 | ||
|
|
a9a46fbe09 | ||
|
|
5431e71f9a | ||
|
|
4baa9b45d2 | ||
|
|
eab4b0854d | ||
|
|
bf0c0e6df3 | ||
|
|
92163d3dc6 | ||
|
|
679e4e46a7 | ||
|
|
525097081d | ||
|
|
c09b25f3e7 | ||
|
|
dc8e16ad37 | ||
|
|
3d27da4ac1 | ||
|
|
cefdecda46 | ||
|
|
347226bb3b | ||
|
|
5866e121b4 | ||
|
|
2872526dc6 | ||
|
|
bb8b13a4a5 | ||
|
|
957ad8b43e | ||
|
|
ce7f9ce621 | ||
|
|
6e9017e125 | ||
|
|
baa1691374 | ||
|
|
bc52a13212 | ||
|
|
c9b6aee07e | ||
|
|
f300429fba | ||
|
|
ad2b38190b | ||
|
|
b24df5bba5 | ||
|
|
43120bc3c3 | ||
|
|
ad9d6a6320 | ||
|
|
039af37997 | ||
|
|
1756ab6acd | ||
|
|
662bb59f48 | ||
|
|
1071fc12d6 | ||
|
|
576b821f29 | ||
|
|
307d3a25a0 | ||
|
|
b622de1dfa | ||
|
|
c76542e033 | ||
|
|
0756542bc5 | ||
|
|
1d018f9b8b | ||
|
|
fe779bf55e | ||
|
|
be666c2fcd | ||
|
|
f7a6fefba9 | ||
|
|
d81c4e45f3 | ||
|
|
1b1bbe1085 | ||
|
|
5d7b214633 | ||
|
|
f2beeb24e1 | ||
|
|
4e7e684fbb | ||
|
|
46c56d6f92 | ||
|
|
66b945764b | ||
|
|
6ba5449b7d | ||
|
|
de5a937a1d | ||
|
|
ead9eaa3cf | ||
|
|
8c57fa3627 | ||
|
|
a7ab372554 | ||
|
|
d0351b4837 | ||
|
|
dded088883 | ||
|
|
0913e9a06e | ||
|
|
e9343db97e | ||
|
|
ae2b61dbc6 | ||
|
|
c190c18feb | ||
|
|
67aec007b3 | ||
|
|
ebb356cc4e | ||
|
|
f4f1212c88 | ||
|
|
c5195efecf | ||
|
|
dd38875f93 | ||
|
|
148017a9b0 | ||
|
|
3b6c050358 | ||
|
|
b8ebb8ba1d | ||
|
|
799ee7c97e | ||
|
|
3a4f6e1af5 | ||
|
|
25f376e348 | ||
|
|
d4e4b6bbc1 | ||
|
|
28b532bcb3 | ||
|
|
51ab6d2e30 | ||
|
|
99d3141d9b | ||
|
|
7a6d8a8234 | ||
|
|
7136edc5e8 | ||
|
|
8df1039502 | ||
|
|
870c199c48 | ||
|
|
83a06ff9d9 | ||
|
|
292cc14be8 | ||
|
|
b36c23c0d9 | ||
|
|
40b9536ce5 | ||
|
|
0a40ce6f61 | ||
|
|
68b1d5a3da | ||
|
|
bcfbca5b71 | ||
|
|
78eae7945c | ||
|
|
2dfa2011c5 | ||
|
|
7467385c61 | ||
|
|
8e04ddff28 | ||
|
|
67fbd726da |
@@ -1,6 +0,0 @@
|
|||||||
# Ignore list
|
|
||||||
/*
|
|
||||||
|
|
||||||
# Do not ignore these folders:
|
|
||||||
!__tests__/
|
|
||||||
!src/
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
// This is a reusable configuration file copied from https://github.com/actions/reusable-workflows/tree/main/reusable-configurations. Please don't make changes to this file as it's the subject of an automatic update.
|
|
||||||
module.exports = {
|
|
||||||
extends: [
|
|
||||||
'eslint:recommended',
|
|
||||||
'plugin:@typescript-eslint/recommended',
|
|
||||||
'plugin:eslint-plugin-jest/recommended',
|
|
||||||
'eslint-config-prettier'
|
|
||||||
],
|
|
||||||
parser: '@typescript-eslint/parser',
|
|
||||||
plugins: ['@typescript-eslint', 'eslint-plugin-node', 'eslint-plugin-jest'],
|
|
||||||
rules: {
|
|
||||||
'@typescript-eslint/no-require-imports': 'error',
|
|
||||||
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
||||||
'@typescript-eslint/no-explicit-any': 'off',
|
|
||||||
'@typescript-eslint/no-empty-function': 'off',
|
|
||||||
'@typescript-eslint/ban-ts-comment': [
|
|
||||||
'error',
|
|
||||||
{
|
|
||||||
'ts-ignore': 'allow-with-description'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
'no-console': 'error',
|
|
||||||
'yoda': 'error',
|
|
||||||
'prefer-const': [
|
|
||||||
'error',
|
|
||||||
{
|
|
||||||
destructuring: 'all'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
'no-control-regex': 'off',
|
|
||||||
'no-constant-condition': ['error', {checkLoops: false}],
|
|
||||||
'node/no-extraneous-import': 'error'
|
|
||||||
},
|
|
||||||
overrides: [
|
|
||||||
{
|
|
||||||
files: ['**/*{test,spec}.ts'],
|
|
||||||
rules: {
|
|
||||||
'@typescript-eslint/no-unused-vars': 'off',
|
|
||||||
'jest/no-standalone-expect': 'off',
|
|
||||||
'jest/no-conditional-expect': 'off',
|
|
||||||
'no-console': 'off',
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
env: {
|
|
||||||
node: true,
|
|
||||||
es6: true,
|
|
||||||
'jest/globals': true
|
|
||||||
}
|
|
||||||
};
|
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
---
|
||||||
|
name: New Java distribution template
|
||||||
|
about: Suggest a new Java distribution
|
||||||
|
title: ''
|
||||||
|
labels: feature request, needs triage
|
||||||
|
assignees: ''
|
||||||
|
---
|
||||||
|
|
||||||
|
**Description:**
|
||||||
|
Describe your proposal.
|
||||||
|
|
||||||
|
**Justification:**
|
||||||
|
Justification or a use case for your proposal.
|
||||||
|
|
||||||
|
**Download URL:**
|
||||||
|
Download URL for the new distribution.
|
||||||
|
|
||||||
|
**License:**
|
||||||
|
Link to the license for the new distribution.
|
||||||
|
|
||||||
|
**Are you willing to submit a PR?**
|
||||||
|
<!--- We accept contributions! -->
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
**Description:**
|
||||||
|
Describe your changes.
|
||||||
|
|
||||||
|
**Related issue:**
|
||||||
|
Add link to the related issue.
|
||||||
|
|
||||||
|
**Download URL:**
|
||||||
|
Download URL for the new distribution.
|
||||||
|
|
||||||
|
**License:**
|
||||||
|
Link to the license for the new distribution.
|
||||||
|
|
||||||
|
**Check list:**
|
||||||
|
- [ ] Mark if documentation changes are required.
|
||||||
|
- [ ] Mark if tests were added or updated to cover the changes.
|
||||||
|
- [ ] Mark if new distribution is being added.
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
# To get started with Dependabot version updates, you'll need to specify which
|
||||||
|
# package ecosystems to update and where the package manifests are located.
|
||||||
|
# Please see the documentation for all configuration options:
|
||||||
|
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
||||||
|
|
||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
# Enable version updates for npm
|
||||||
|
- package-ecosystem: 'npm'
|
||||||
|
# Look for `package.json` and `lock` files in the `root` directory
|
||||||
|
directory: '/'
|
||||||
|
# Check the npm registry for updates every day (weekdays)
|
||||||
|
schedule:
|
||||||
|
interval: 'weekly'
|
||||||
|
|
||||||
|
# Enable version updates for GitHub Actions
|
||||||
|
- package-ecosystem: 'github-actions'
|
||||||
|
# Workflow files stored in the default location of `.github/workflows`
|
||||||
|
# You don't need to specify `/.github/workflows` for `directory`. You can use `directory: "/"`.
|
||||||
|
directory: '/'
|
||||||
|
schedule:
|
||||||
|
interval: 'weekly'
|
||||||
@@ -9,6 +9,31 @@
|
|||||||
"message": 3
|
"message": 3
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"owner": "javac",
|
||||||
|
"pattern": [
|
||||||
|
{
|
||||||
|
"regexp": "^([^:]+):(\\d+): (warning|error): (.+?)$",
|
||||||
|
"file": 1,
|
||||||
|
"line": 2,
|
||||||
|
"severity": 3,
|
||||||
|
"message": 4
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"owner": "maven-javac",
|
||||||
|
"pattern": [
|
||||||
|
{
|
||||||
|
"regexp": "^\\[(WARNING|ERROR)\\]\\s+(.+?\\.java):\\[(\\d+),(\\d+)\\]\\s+(.+)$",
|
||||||
|
"severity": 1,
|
||||||
|
"file": 2,
|
||||||
|
"line": 3,
|
||||||
|
"column": 4,
|
||||||
|
"message": 5
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -5,5 +5,6 @@ Describe your changes.
|
|||||||
Add link to the related issue.
|
Add link to the related issue.
|
||||||
|
|
||||||
**Check list:**
|
**Check list:**
|
||||||
|
- [ ] Ran `npm run check` locally (format, lint, build, test) and all checks pass.
|
||||||
- [ ] Mark if documentation changes are required.
|
- [ ] Mark if documentation changes are required.
|
||||||
- [ ] Mark if tests were added or updated to cover the changes.
|
- [ ] Mark if tests were added or updated to cover the changes.
|
||||||
@@ -11,9 +11,12 @@ on:
|
|||||||
paths-ignore:
|
paths-ignore:
|
||||||
- '**.md'
|
- '**.md'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
call-basic-validation:
|
call-basic-validation:
|
||||||
name: Basic validation
|
name: Basic validation
|
||||||
uses: actions/reusable-workflows/.github/workflows/basic-validation.yml@main
|
uses: actions/reusable-workflows/.github/workflows/basic-validation.yml@main
|
||||||
with:
|
with:
|
||||||
node-version: '20.x'
|
node-version: '24.x'
|
||||||
|
|||||||
@@ -0,0 +1,211 @@
|
|||||||
|
name: Benchmark cache restore
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
baseline-ref:
|
||||||
|
description: Git ref containing the sequential restore implementation
|
||||||
|
required: true
|
||||||
|
default: main
|
||||||
|
type: string
|
||||||
|
candidate-ref:
|
||||||
|
description: Git ref containing the concurrent restore implementation (defaults to the dispatched ref)
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
warm-caches:
|
||||||
|
name: Warm ${{ matrix.tool }} ${{ matrix.profile }} caches (${{ matrix.os }})
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
cache-mode: write-only
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-15-intel, windows-latest, ubuntu-latest]
|
||||||
|
tool: [maven, gradle]
|
||||||
|
profile: [small, large]
|
||||||
|
steps:
|
||||||
|
- name: Checkout benchmark workflow
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Checkout baseline
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
path: baseline
|
||||||
|
persist-credentials: false
|
||||||
|
ref: ${{ inputs.baseline-ref }}
|
||||||
|
- name: Checkout candidate
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
path: candidate
|
||||||
|
persist-credentials: false
|
||||||
|
ref: ${{ inputs.candidate-ref || github.ref }}
|
||||||
|
- name: Prepare benchmark inputs
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh prepare "${{ matrix.tool }}" "${{ matrix.profile }}"
|
||||||
|
- name: Prepare cache save
|
||||||
|
uses: ./candidate
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: '17'
|
||||||
|
cache: ${{ matrix.tool }}
|
||||||
|
cache-dependency-path: benchmark/${{ matrix.tool == 'maven' && 'pom.xml' || 'build.gradle' }}
|
||||||
|
- name: Populate benchmark caches
|
||||||
|
run: |
|
||||||
|
bash __tests__/benchmark-cache-restore.sh reset "${{ matrix.tool }}"
|
||||||
|
bash __tests__/benchmark-cache-restore.sh populate "${{ matrix.tool }}" "${{ matrix.profile }}"
|
||||||
|
|
||||||
|
benchmark:
|
||||||
|
name: Benchmark ${{ matrix.tool }} ${{ matrix.profile }} (${{ matrix.os }})
|
||||||
|
needs: warm-caches
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
cache-mode: read
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-15-intel, windows-latest, ubuntu-latest]
|
||||||
|
tool: [maven, gradle]
|
||||||
|
profile: [small, large]
|
||||||
|
steps:
|
||||||
|
- name: Checkout benchmark workflow
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Checkout baseline
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
path: baseline
|
||||||
|
persist-credentials: false
|
||||||
|
ref: ${{ inputs.baseline-ref }}
|
||||||
|
- name: Checkout candidate
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
path: candidate
|
||||||
|
persist-credentials: false
|
||||||
|
ref: ${{ inputs.candidate-ref || github.ref }}
|
||||||
|
- name: Prepare benchmark inputs
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh prepare "${{ matrix.tool }}" "${{ matrix.profile }}"
|
||||||
|
|
||||||
|
- name: Reset caches for baseline iteration 1
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh reset "${{ matrix.tool }}"
|
||||||
|
- name: Start baseline iteration 1 timer
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh start "${{ matrix.tool }}"
|
||||||
|
- name: Restore with baseline iteration 1
|
||||||
|
id: baseline-1
|
||||||
|
uses: ./baseline
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: '17'
|
||||||
|
cache: ${{ matrix.tool }}
|
||||||
|
cache-dependency-path: benchmark/${{ matrix.tool == 'maven' && 'pom.xml' || 'build.gradle' }}
|
||||||
|
cache-read-only: true
|
||||||
|
- name: Record baseline iteration 1
|
||||||
|
env:
|
||||||
|
CACHE_HIT: ${{ steps.baseline-1.outputs.cache-hit }}
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh record "${{ matrix.tool }}" "${{ matrix.os }}" "${{ matrix.profile }}" baseline 1 "$CACHE_HIT"
|
||||||
|
|
||||||
|
- name: Reset caches for candidate iteration 1
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh reset "${{ matrix.tool }}"
|
||||||
|
- name: Start candidate iteration 1 timer
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh start "${{ matrix.tool }}"
|
||||||
|
- name: Restore with candidate iteration 1
|
||||||
|
id: candidate-1
|
||||||
|
uses: ./candidate
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: '17'
|
||||||
|
cache: ${{ matrix.tool }}
|
||||||
|
cache-dependency-path: benchmark/${{ matrix.tool == 'maven' && 'pom.xml' || 'build.gradle' }}
|
||||||
|
cache-read-only: true
|
||||||
|
- name: Record candidate iteration 1
|
||||||
|
env:
|
||||||
|
CACHE_HIT: ${{ steps.candidate-1.outputs.cache-hit }}
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh record "${{ matrix.tool }}" "${{ matrix.os }}" "${{ matrix.profile }}" candidate 1 "$CACHE_HIT"
|
||||||
|
|
||||||
|
- name: Reset caches for candidate iteration 2
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh reset "${{ matrix.tool }}"
|
||||||
|
- name: Start candidate iteration 2 timer
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh start "${{ matrix.tool }}"
|
||||||
|
- name: Restore with candidate iteration 2
|
||||||
|
id: candidate-2
|
||||||
|
uses: ./candidate
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: '17'
|
||||||
|
cache: ${{ matrix.tool }}
|
||||||
|
cache-dependency-path: benchmark/${{ matrix.tool == 'maven' && 'pom.xml' || 'build.gradle' }}
|
||||||
|
cache-read-only: true
|
||||||
|
- name: Record candidate iteration 2
|
||||||
|
env:
|
||||||
|
CACHE_HIT: ${{ steps.candidate-2.outputs.cache-hit }}
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh record "${{ matrix.tool }}" "${{ matrix.os }}" "${{ matrix.profile }}" candidate 2 "$CACHE_HIT"
|
||||||
|
|
||||||
|
- name: Reset caches for baseline iteration 2
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh reset "${{ matrix.tool }}"
|
||||||
|
- name: Start baseline iteration 2 timer
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh start "${{ matrix.tool }}"
|
||||||
|
- name: Restore with baseline iteration 2
|
||||||
|
id: baseline-2
|
||||||
|
uses: ./baseline
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: '17'
|
||||||
|
cache: ${{ matrix.tool }}
|
||||||
|
cache-dependency-path: benchmark/${{ matrix.tool == 'maven' && 'pom.xml' || 'build.gradle' }}
|
||||||
|
cache-read-only: true
|
||||||
|
- name: Record baseline iteration 2
|
||||||
|
env:
|
||||||
|
CACHE_HIT: ${{ steps.baseline-2.outputs.cache-hit }}
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh record "${{ matrix.tool }}" "${{ matrix.os }}" "${{ matrix.profile }}" baseline 2 "$CACHE_HIT"
|
||||||
|
|
||||||
|
- name: Reset caches for baseline iteration 3
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh reset "${{ matrix.tool }}"
|
||||||
|
- name: Start baseline iteration 3 timer
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh start "${{ matrix.tool }}"
|
||||||
|
- name: Restore with baseline iteration 3
|
||||||
|
id: baseline-3
|
||||||
|
uses: ./baseline
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: '17'
|
||||||
|
cache: ${{ matrix.tool }}
|
||||||
|
cache-dependency-path: benchmark/${{ matrix.tool == 'maven' && 'pom.xml' || 'build.gradle' }}
|
||||||
|
cache-read-only: true
|
||||||
|
- name: Record baseline iteration 3
|
||||||
|
env:
|
||||||
|
CACHE_HIT: ${{ steps.baseline-3.outputs.cache-hit }}
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh record "${{ matrix.tool }}" "${{ matrix.os }}" "${{ matrix.profile }}" baseline 3 "$CACHE_HIT"
|
||||||
|
|
||||||
|
- name: Reset caches for candidate iteration 3
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh reset "${{ matrix.tool }}"
|
||||||
|
- name: Start candidate iteration 3 timer
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh start "${{ matrix.tool }}"
|
||||||
|
- name: Restore with candidate iteration 3
|
||||||
|
id: candidate-3
|
||||||
|
uses: ./candidate
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: '17'
|
||||||
|
cache: ${{ matrix.tool }}
|
||||||
|
cache-dependency-path: benchmark/${{ matrix.tool == 'maven' && 'pom.xml' || 'build.gradle' }}
|
||||||
|
cache-read-only: true
|
||||||
|
- name: Record candidate iteration 3
|
||||||
|
env:
|
||||||
|
CACHE_HIT: ${{ steps.candidate-3.outputs.cache-hit }}
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh record "${{ matrix.tool }}" "${{ matrix.os }}" "${{ matrix.profile }}" candidate 3 "$CACHE_HIT"
|
||||||
|
|
||||||
|
- name: Summarize benchmark
|
||||||
|
run: bash __tests__/benchmark-cache-restore.sh summarize "${{ matrix.tool }}" "$GITHUB_STEP_SUMMARY"
|
||||||
|
- name: Upload raw timings
|
||||||
|
uses: actions/upload-artifact@v7
|
||||||
|
with:
|
||||||
|
name: cache-restore-${{ matrix.os }}-${{ matrix.tool }}-${{ matrix.profile }}
|
||||||
|
path: .benchmark-results/timings.csv
|
||||||
|
if-no-files-found: error
|
||||||
@@ -11,9 +11,12 @@ on:
|
|||||||
- '**.md'
|
- '**.md'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
call-check-dist:
|
call-check-dist:
|
||||||
name: Check dist/
|
name: Check dist/
|
||||||
uses: actions/reusable-workflows/.github/workflows/check-dist.yml@main
|
uses: actions/reusable-workflows/.github/workflows/check-dist.yml@main
|
||||||
with:
|
with:
|
||||||
node-version: '20.x'
|
node-version: '24.x'
|
||||||
|
|||||||
@@ -8,7 +8,13 @@ on:
|
|||||||
schedule:
|
schedule:
|
||||||
- cron: '0 3 * * 0'
|
- cron: '0 3 * * 0'
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
call-codeQL-analysis:
|
call-codeQL-analysis:
|
||||||
|
permissions:
|
||||||
|
actions: read
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
name: CodeQL analysis
|
name: CodeQL analysis
|
||||||
uses: actions/reusable-workflows/.github/workflows/codeql-analysis.yml@main
|
uses: actions/reusable-workflows/.github/workflows/codeql-analysis.yml@main
|
||||||
|
|||||||
@@ -1,93 +0,0 @@
|
|||||||
name: Validate cache with cache-dependency-path option
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- releases/*
|
|
||||||
paths-ignore:
|
|
||||||
- '**.md'
|
|
||||||
pull_request:
|
|
||||||
paths-ignore:
|
|
||||||
- '**.md'
|
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
gradle1-save:
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Run setup-java with the cache for gradle
|
|
||||||
uses: ./
|
|
||||||
id: setup-java
|
|
||||||
with:
|
|
||||||
distribution: 'adopt'
|
|
||||||
java-version: '11'
|
|
||||||
cache: gradle
|
|
||||||
cache-dependency-path: __tests__/cache/gradle1/*.gradle*
|
|
||||||
- name: Create files to cache
|
|
||||||
# Need to avoid using Gradle daemon to stabilize the save process on Windows
|
|
||||||
# https://github.com/actions/cache/issues/454#issuecomment-840493935
|
|
||||||
run: |
|
|
||||||
gradle downloadDependencies --no-daemon -p __tests__/cache/gradle1
|
|
||||||
if [ ! -d ~/.gradle/caches ]; then
|
|
||||||
echo "::error::The ~/.gradle/caches directory does not exist unexpectedly"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
gradle1-restore:
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
|
||||||
needs: gradle1-save
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Run setup-java with the cache for gradle
|
|
||||||
uses: ./
|
|
||||||
id: setup-java
|
|
||||||
with:
|
|
||||||
distribution: 'adopt'
|
|
||||||
java-version: '11'
|
|
||||||
cache: gradle
|
|
||||||
cache-dependency-path: __tests__/cache/gradle1/*.gradle*
|
|
||||||
- name: Confirm that ~/.gradle/caches directory has been made
|
|
||||||
run: |
|
|
||||||
if [ ! -d ~/.gradle/caches ]; then
|
|
||||||
echo "::error::The ~/.gradle/caches directory does not exist unexpectedly"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
ls ~/.gradle/caches/
|
|
||||||
gradle2-restore:
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
|
||||||
needs: gradle1-save
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Run setup-java with the cache for gradle
|
|
||||||
uses: ./
|
|
||||||
id: setup-java
|
|
||||||
with:
|
|
||||||
distribution: 'adopt'
|
|
||||||
java-version: '11'
|
|
||||||
cache: gradle
|
|
||||||
cache-dependency-path: __tests__/cache/gradle2/*.gradle*
|
|
||||||
- name: Confirm that ~/.gradle/caches directory has not been made
|
|
||||||
run: |
|
|
||||||
if [ -d ~/.gradle/caches ]; then
|
|
||||||
echo "::error::The ~/.gradle/caches directory exists unexpectedly"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
+381
-76
@@ -11,6 +11,9 @@ on:
|
|||||||
paths-ignore:
|
paths-ignore:
|
||||||
- '**.md'
|
- '**.md'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -18,102 +21,111 @@ defaults:
|
|||||||
jobs:
|
jobs:
|
||||||
gradle-save:
|
gradle-save:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
cache-mode: write-only
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-13, windows-latest, ubuntu-latest]
|
os: [macos-15-intel, windows-latest, ubuntu-latest]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
- name: Run setup-java with the cache for gradle
|
- name: Run setup-java with the cache for gradle
|
||||||
uses: ./
|
uses: ./
|
||||||
id: setup-java
|
id: setup-java
|
||||||
with:
|
with:
|
||||||
distribution: 'adopt'
|
distribution: 'temurin'
|
||||||
java-version: '11'
|
java-version: '17'
|
||||||
cache: gradle
|
cache: gradle
|
||||||
- name: Create files to cache
|
- name: Create files to cache
|
||||||
# Need to avoid using Gradle daemon to stabilize the save process on Windows
|
# Need to avoid using Gradle daemon to stabilize the save process on Windows
|
||||||
# https://github.com/actions/cache/issues/454#issuecomment-840493935
|
# https://github.com/actions/cache/issues/454#issuecomment-840493935
|
||||||
run: |
|
run: |
|
||||||
gradle downloadDependencies --no-daemon -p __tests__/cache/gradle1
|
gradle downloadDependencies --no-daemon -p __tests__/cache/gradle1
|
||||||
if [ ! -d ~/.gradle/caches ]; then
|
mkdir -p "$HOME/.gradle/wrapper/dists/setup-java-e2e"
|
||||||
echo "::error::The ~/.gradle/caches directory does not exist unexpectedly"
|
echo "gradle wrapper cache" > "$HOME/.gradle/wrapper/dists/setup-java-e2e/payload"
|
||||||
exit 1
|
bash __tests__/check-dir.sh "$HOME/.gradle/caches"
|
||||||
fi
|
bash __tests__/check-dir.sh "$HOME/.gradle/wrapper/dists"
|
||||||
gradle-restore:
|
gradle-restore:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
cache-mode: read
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-13, windows-latest, ubuntu-latest]
|
os: [macos-15-intel, windows-latest, ubuntu-latest]
|
||||||
needs: gradle-save
|
needs: gradle-save
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
- name: Run setup-java with the cache for gradle
|
- name: Run setup-java with the cache for gradle
|
||||||
uses: ./
|
uses: ./
|
||||||
id: setup-java
|
id: setup-java
|
||||||
with:
|
with:
|
||||||
distribution: 'adopt'
|
distribution: 'temurin'
|
||||||
java-version: '11'
|
java-version: '11'
|
||||||
cache: gradle
|
cache: gradle
|
||||||
|
cache-read-only: true
|
||||||
- name: Confirm that ~/.gradle/caches directory has been made
|
- name: Confirm that ~/.gradle/caches directory has been made
|
||||||
run: |
|
run: bash __tests__/check-dir.sh "$HOME/.gradle/caches"
|
||||||
if [ ! -d ~/.gradle/caches ]; then
|
- name: Confirm that the Gradle Wrapper cache has been restored
|
||||||
echo "::error::The ~/.gradle/caches directory does not exist unexpectedly"
|
run: bash __tests__/check-dir.sh "$HOME/.gradle/wrapper/dists"
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
ls ~/.gradle/caches/
|
|
||||||
maven-save:
|
maven-save:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
cache-mode: write-only
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-13, windows-latest, ubuntu-latest]
|
os: [macos-15-intel, windows-latest, ubuntu-latest]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
- name: Run setup-java with the cache for maven
|
- name: Run setup-java with the cache for maven
|
||||||
uses: ./
|
uses: ./
|
||||||
id: setup-java
|
id: setup-java
|
||||||
with:
|
with:
|
||||||
distribution: 'adopt'
|
distribution: 'temurin'
|
||||||
java-version: '11'
|
java-version: '11'
|
||||||
cache: maven
|
cache: maven
|
||||||
- name: Create files to cache
|
- name: Create files to cache
|
||||||
run: |
|
run: |
|
||||||
mvn verify -f __tests__/cache/maven/pom.xml
|
mvn verify -f __tests__/cache/maven/pom.xml
|
||||||
if [ ! -d ~/.m2/repository ]; then
|
mkdir -p "$HOME/.m2/wrapper/dists/setup-java-e2e"
|
||||||
echo "::error::The ~/.m2/repository directory does not exist unexpectedly"
|
echo "maven wrapper cache" > "$HOME/.m2/wrapper/dists/setup-java-e2e/payload"
|
||||||
exit 1
|
bash __tests__/check-dir.sh "$HOME/.m2/repository"
|
||||||
fi
|
bash __tests__/check-dir.sh "$HOME/.m2/wrapper/dists"
|
||||||
maven-restore:
|
maven-restore:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
cache-mode: read
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-13, windows-latest, ubuntu-latest]
|
os: [macos-15-intel, windows-latest, ubuntu-latest]
|
||||||
needs: maven-save
|
needs: maven-save
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
- name: Run setup-java with the cache for maven
|
- name: Run setup-java with the cache for maven
|
||||||
uses: ./
|
uses: ./
|
||||||
id: setup-java
|
id: setup-java
|
||||||
with:
|
with:
|
||||||
distribution: 'adopt'
|
distribution: 'temurin'
|
||||||
java-version: '11'
|
java-version: '11'
|
||||||
cache: maven
|
cache: maven
|
||||||
|
cache-read-only: true
|
||||||
- name: Confirm that ~/.m2/repository directory has been made
|
- name: Confirm that ~/.m2/repository directory has been made
|
||||||
run: |
|
run: bash __tests__/check-dir.sh "$HOME/.m2/repository"
|
||||||
if [ ! -d ~/.m2/repository ]; then
|
- name: Confirm that the Maven Wrapper cache has been restored
|
||||||
echo "::error::The ~/.m2/repository directory does not exist unexpectedly"
|
run: bash __tests__/check-dir.sh "$HOME/.m2/wrapper/dists"
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
ls ~/.m2/repository
|
|
||||||
sbt-save:
|
sbt-save:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
cache-mode: write-only
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -121,19 +133,21 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-13, windows-latest, ubuntu-latest]
|
os: [macos-15-intel, windows-latest, ubuntu-22.04]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
- name: Run setup-java with the cache for sbt
|
- name: Run setup-java with the cache for sbt
|
||||||
uses: ./
|
uses: ./
|
||||||
id: setup-java
|
id: setup-java
|
||||||
with:
|
with:
|
||||||
distribution: 'adopt'
|
distribution: 'temurin'
|
||||||
java-version: '11'
|
java-version: '11'
|
||||||
cache: sbt
|
cache: sbt
|
||||||
- name: Setup SBT
|
- name: Setup SBT
|
||||||
if: matrix.os == 'macos-13'
|
if: matrix.os == 'macos-15-intel'
|
||||||
run: |
|
run: |
|
||||||
echo ""Installing SBT...""
|
echo ""Installing SBT...""
|
||||||
brew install sbt
|
brew install sbt
|
||||||
@@ -141,28 +155,17 @@ jobs:
|
|||||||
run: sbt update
|
run: sbt update
|
||||||
|
|
||||||
- name: Check files to cache on macos-latest
|
- name: Check files to cache on macos-latest
|
||||||
if: matrix.os == 'macos-13'
|
if: matrix.os == 'macos-15-intel'
|
||||||
run: |
|
run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/Library/Caches/Coursier"
|
||||||
if [ ! -d ~/Library/Caches/Coursier ]; then
|
|
||||||
echo "::error::The ~/Library/Caches/Coursier directory does not exist unexpectedly"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
- name: Check files to cache on windows-latest
|
- name: Check files to cache on windows-latest
|
||||||
if: matrix.os == 'windows-latest'
|
if: matrix.os == 'windows-latest'
|
||||||
run: |
|
run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/AppData/Local/Coursier/Cache"
|
||||||
if [ ! -d ~/AppData/Local/Coursier/Cache ]; then
|
|
||||||
echo "::error::The ~/AppData/Local/Coursier/Cache directory does not exist unexpectedly"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
- name: Check files to cache on ubuntu-latest
|
- name: Check files to cache on ubuntu-latest
|
||||||
if: matrix.os == 'ubuntu-latest'
|
if: matrix.os == 'ubuntu-22.04'
|
||||||
run: |
|
run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/.cache/coursier"
|
||||||
if [ ! -d ~/.cache/coursier ]; then
|
|
||||||
echo "::error::The ~/.cache/coursier directory does not exist unexpectedly"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
sbt-restore:
|
sbt-restore:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
cache-mode: read
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -170,40 +173,342 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-13, windows-latest, ubuntu-latest]
|
os: [macos-15-intel, windows-latest, ubuntu-22.04]
|
||||||
needs: sbt-save
|
needs: sbt-save
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
- name: Run setup-java with the cache for sbt
|
- name: Run setup-java with the cache for sbt
|
||||||
uses: ./
|
uses: ./
|
||||||
id: setup-java
|
id: setup-java
|
||||||
with:
|
with:
|
||||||
distribution: 'adopt'
|
distribution: 'temurin'
|
||||||
java-version: '11'
|
java-version: '11'
|
||||||
cache: sbt
|
cache: sbt
|
||||||
|
cache-read-only: true
|
||||||
|
|
||||||
- name: Confirm that ~/Library/Caches/Coursier directory has been made
|
- name: Confirm that ~/Library/Caches/Coursier directory has been made
|
||||||
if: matrix.os == 'macos-13'
|
if: matrix.os == 'macos-15-intel'
|
||||||
run: |
|
run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/Library/Caches/Coursier"
|
||||||
if [ ! -d ~/Library/Caches/Coursier ]; then
|
|
||||||
echo "::error::The ~/Library/Caches/Coursier directory does not exist unexpectedly"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
ls ~/Library/Caches/Coursier
|
|
||||||
- name: Confirm that ~/AppData/Local/Coursier/Cache directory has been made
|
- name: Confirm that ~/AppData/Local/Coursier/Cache directory has been made
|
||||||
if: matrix.os == 'windows-latest'
|
if: matrix.os == 'windows-latest'
|
||||||
run: |
|
run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/AppData/Local/Coursier/Cache"
|
||||||
if [ ! -d ~/AppData/Local/Coursier/Cache ]; then
|
|
||||||
echo "::error::The ~/AppData/Local/Coursier/Cache directory does not exist unexpectedly"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
ls ~/AppData/Local/Coursier/Cache
|
|
||||||
- name: Confirm that ~/.cache/coursier directory has been made
|
- name: Confirm that ~/.cache/coursier directory has been made
|
||||||
if: matrix.os == 'ubuntu-latest'
|
if: matrix.os == 'ubuntu-22.04'
|
||||||
|
run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/.cache/coursier"
|
||||||
|
gradle1-save:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
cache-mode: write-only
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Run setup-java with the cache for gradle
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '17'
|
||||||
|
cache: gradle
|
||||||
|
cache-dependency-path: __tests__/cache/gradle1/*.gradle*
|
||||||
|
- name: Create files to cache
|
||||||
|
# Need to avoid using Gradle daemon to stabilize the save process on Windows
|
||||||
|
# https://github.com/actions/cache/issues/454#issuecomment-840493935
|
||||||
run: |
|
run: |
|
||||||
if [ ! -d ~/.cache/coursier ]; then
|
gradle downloadDependencies --no-daemon -p __tests__/cache/gradle1
|
||||||
echo "::error::The ~/.cache/coursier directory does not exist unexpectedly"
|
mkdir -p "$HOME/.gradle/wrapper/dists/setup-java-e2e-gradle1"
|
||||||
exit 1
|
echo "gradle wrapper cache gradle1" > "$HOME/.gradle/wrapper/dists/setup-java-e2e-gradle1/payload"
|
||||||
fi
|
bash __tests__/check-dir.sh "$HOME/.gradle/caches"
|
||||||
ls ~/.cache/coursier
|
bash __tests__/check-dir.sh "$HOME/.gradle/wrapper/dists"
|
||||||
|
gradle1-restore:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
cache-mode: read
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
|
needs: gradle1-save
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Run setup-java with the cache for gradle
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '11'
|
||||||
|
cache: gradle
|
||||||
|
cache-dependency-path: __tests__/cache/gradle1/*.gradle*
|
||||||
|
- name: Confirm that ~/.gradle/caches directory has been made
|
||||||
|
run: bash __tests__/check-dir.sh "$HOME/.gradle/caches"
|
||||||
|
- name: Confirm that the Gradle Wrapper cache has been restored
|
||||||
|
run: bash __tests__/check-dir.sh "$HOME/.gradle/wrapper/dists"
|
||||||
|
gradle2-restore:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
cache-mode: read
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
|
needs: gradle1-save
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Run setup-java with the cache for gradle
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '11'
|
||||||
|
cache: gradle
|
||||||
|
cache-dependency-path: __tests__/cache/gradle2/*.gradle*
|
||||||
|
- name: Confirm that ~/.gradle/caches directory has not been made
|
||||||
|
run: bash __tests__/check-dir.sh "$HOME/.gradle/caches" absent
|
||||||
|
maven1-save:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
cache-mode: write-only
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-15-intel, windows-latest, ubuntu-latest]
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Run setup-java with the cache for maven
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '11'
|
||||||
|
cache: maven
|
||||||
|
cache-dependency-path: __tests__/cache/maven/pom.xml
|
||||||
|
- name: Create files to cache
|
||||||
|
run: |
|
||||||
|
mvn verify -f __tests__/cache/maven/pom.xml
|
||||||
|
mkdir -p "$HOME/.m2/wrapper/dists/setup-java-e2e-maven1"
|
||||||
|
echo "maven wrapper cache maven1" > "$HOME/.m2/wrapper/dists/setup-java-e2e-maven1/payload"
|
||||||
|
bash __tests__/check-dir.sh "$HOME/.m2/repository"
|
||||||
|
bash __tests__/check-dir.sh "$HOME/.m2/wrapper/dists"
|
||||||
|
maven1-restore:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
cache-mode: read
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-15-intel, windows-latest, ubuntu-latest]
|
||||||
|
needs: maven1-save
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Run setup-java with the cache for maven
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '11'
|
||||||
|
cache: maven
|
||||||
|
cache-dependency-path: __tests__/cache/maven/pom.xml
|
||||||
|
- name: Confirm that ~/.m2/repository directory has been made
|
||||||
|
run: bash __tests__/check-dir.sh "$HOME/.m2/repository"
|
||||||
|
- name: Confirm that the Maven Wrapper cache has been restored
|
||||||
|
run: bash __tests__/check-dir.sh "$HOME/.m2/wrapper/dists"
|
||||||
|
maven2-restore:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
cache-mode: read
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-15-intel, windows-latest, ubuntu-latest]
|
||||||
|
needs: maven1-save
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Run setup-java with the cache for maven
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '11'
|
||||||
|
cache: maven
|
||||||
|
cache-dependency-path: |
|
||||||
|
__tests__/cache/maven2/pom.xml
|
||||||
|
README.md
|
||||||
|
- name: Confirm that ~/.m2/repository directory has not been made
|
||||||
|
run: bash __tests__/check-dir.sh "$HOME/.m2/repository" absent
|
||||||
|
sbt1-save:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
cache-mode: write-only
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
working-directory: __tests__/cache/sbt
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-15-intel, windows-latest, ubuntu-22.04]
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Run setup-java with the cache for sbt
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '11'
|
||||||
|
cache: sbt
|
||||||
|
cache-dependency-path: __tests__/cache/sbt/*.sbt
|
||||||
|
- name: Setup SBT
|
||||||
|
if: matrix.os == 'macos-15-intel'
|
||||||
|
run: |
|
||||||
|
echo ""Installing SBT...""
|
||||||
|
brew install sbt
|
||||||
|
- name: Create files to cache
|
||||||
|
run: sbt update
|
||||||
|
|
||||||
|
- name: Check files to cache on macos-latest
|
||||||
|
if: matrix.os == 'macos-15-intel'
|
||||||
|
run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/Library/Caches/Coursier"
|
||||||
|
- name: Check files to cache on windows-latest
|
||||||
|
if: matrix.os == 'windows-latest'
|
||||||
|
run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/AppData/Local/Coursier/Cache"
|
||||||
|
- name: Check files to cache on ubuntu-latest
|
||||||
|
if: matrix.os == 'ubuntu-22.04'
|
||||||
|
run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/.cache/coursier"
|
||||||
|
sbt1-restore:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
cache-mode: read
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
working-directory: __tests__/cache/sbt
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-15-intel, windows-latest, ubuntu-22.04]
|
||||||
|
needs: sbt1-save
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Run setup-java with the cache for sbt
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '11'
|
||||||
|
cache: sbt
|
||||||
|
cache-dependency-path: __tests__/cache/sbt/*.sbt
|
||||||
|
|
||||||
|
- name: Confirm that ~/Library/Caches/Coursier directory has been made
|
||||||
|
if: matrix.os == 'macos-15-intel'
|
||||||
|
run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/Library/Caches/Coursier"
|
||||||
|
- name: Confirm that ~/AppData/Local/Coursier/Cache directory has been made
|
||||||
|
if: matrix.os == 'windows-latest'
|
||||||
|
run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/AppData/Local/Coursier/Cache"
|
||||||
|
- name: Confirm that ~/.cache/coursier directory has been made
|
||||||
|
if: matrix.os == 'ubuntu-22.04'
|
||||||
|
run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/.cache/coursier"
|
||||||
|
sbt2-restore:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
cache-mode: read
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
working-directory: __tests__/cache/sbt2
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [macos-15-intel, windows-latest, ubuntu-22.04]
|
||||||
|
needs: sbt1-save
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Run setup-java with the cache for sbt
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '11'
|
||||||
|
cache: sbt
|
||||||
|
cache-dependency-path: __tests__/cache/sbt2/*.sbt
|
||||||
|
|
||||||
|
- name: Confirm that ~/Library/Caches/Coursier directory has not been made
|
||||||
|
if: matrix.os == 'macos-15-intel'
|
||||||
|
run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/Library/Caches/Coursier" absent
|
||||||
|
- name: Confirm that ~/AppData/Local/Coursier/Cache directory has not been made
|
||||||
|
if: matrix.os == 'windows-latest'
|
||||||
|
run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/AppData/Local/Coursier/Cache" absent
|
||||||
|
- name: Confirm that ~/.cache/coursier directory has not been made
|
||||||
|
if: matrix.os == 'ubuntu-22.04'
|
||||||
|
run: bash "$GITHUB_WORKSPACE/__tests__/check-dir.sh" "$HOME/.cache/coursier" absent
|
||||||
|
custom-maven-path-save:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
cache-mode: write-only
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Run setup-java with a custom Maven cache path
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '11'
|
||||||
|
cache: maven
|
||||||
|
cache-dependency-path: |
|
||||||
|
__tests__/cache/maven2/pom.xml
|
||||||
|
.github/workflows/e2e-cache.yml
|
||||||
|
cache-path: |
|
||||||
|
${{ runner.temp }}/setup-java-custom-maven-repository
|
||||||
|
!${{ runner.temp }}/setup-java-custom-maven-repository/**/*.lastUpdated
|
||||||
|
- name: Populate the custom Maven repository
|
||||||
|
run: |
|
||||||
|
mvn -Dmaven.repo.local="$RUNNER_TEMP/setup-java-custom-maven-repository" verify -f __tests__/cache/maven2/pom.xml
|
||||||
|
touch "$RUNNER_TEMP/setup-java-custom-maven-repository/setup-java-cache-path-marker"
|
||||||
|
bash __tests__/check-dir.sh "$RUNNER_TEMP/setup-java-custom-maven-repository"
|
||||||
|
custom-maven-path-restore:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
cache-mode: read
|
||||||
|
needs: custom-maven-path-save
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Run setup-java with a custom Maven cache path
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '11'
|
||||||
|
cache: maven
|
||||||
|
cache-dependency-path: |
|
||||||
|
__tests__/cache/maven2/pom.xml
|
||||||
|
.github/workflows/e2e-cache.yml
|
||||||
|
cache-path: |
|
||||||
|
${{ runner.temp }}/setup-java-custom-maven-repository
|
||||||
|
!${{ runner.temp }}/setup-java-custom-maven-repository/**/*.lastUpdated
|
||||||
|
cache-read-only: true
|
||||||
|
- name: Confirm that the custom Maven repository has been restored
|
||||||
|
run: test -f "$RUNNER_TEMP/setup-java-custom-maven-repository/setup-java-cache-path-marker"
|
||||||
|
|||||||
@@ -11,44 +11,10 @@ on:
|
|||||||
paths-ignore:
|
paths-ignore:
|
||||||
- '**.md'
|
- '**.md'
|
||||||
|
|
||||||
jobs:
|
permissions:
|
||||||
setup-java-local-file-adopt:
|
contents: read
|
||||||
name: Validate installation from local file Adopt
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Download Adopt OpenJDK file
|
|
||||||
run: |
|
|
||||||
if ($IsLinux) {
|
|
||||||
$downloadUrl = "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.10%2B9/OpenJDK11U-jdk_x64_linux_hotspot_11.0.10_9.tar.gz"
|
|
||||||
$localFilename = "java_package.tar.gz"
|
|
||||||
} elseif ($IsMacOS) {
|
|
||||||
$downloadUrl = "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.10%2B9/OpenJDK11U-jdk_x64_mac_hotspot_11.0.10_9.tar.gz"
|
|
||||||
$localFilename = "java_package.tar.gz"
|
|
||||||
} elseif ($IsWindows) {
|
|
||||||
$downloadUrl = "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.10%2B9/OpenJDK11U-jdk_x64_windows_hotspot_11.0.10_9.zip"
|
|
||||||
$localFilename = "java_package.zip"
|
|
||||||
}
|
|
||||||
echo "LocalFilename=$localFilename" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
|
||||||
(New-Object System.Net.WebClient).DownloadFile($downloadUrl, "$env:RUNNER_TEMP/$localFilename")
|
|
||||||
shell: pwsh
|
|
||||||
- name: setup-java
|
|
||||||
uses: ./
|
|
||||||
id: setup-java
|
|
||||||
with:
|
|
||||||
distribution: 'jdkfile'
|
|
||||||
jdkFile: ${{ runner.temp }}/${{ env.LocalFilename }}
|
|
||||||
java-version: '11.0.0-ea'
|
|
||||||
architecture: x64
|
|
||||||
- name: Verify Java version
|
|
||||||
run: bash __tests__/verify-java.sh "11.0.10" "${{ steps.setup-java.outputs.path }}"
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
|
jobs:
|
||||||
setup-java-local-file-zulu:
|
setup-java-local-file-zulu:
|
||||||
name: Validate installation from local file Zulu
|
name: Validate installation from local file Zulu
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
@@ -58,7 +24,9 @@ jobs:
|
|||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
- name: Download Zulu OpenJDK file
|
- name: Download Zulu OpenJDK file
|
||||||
run: |
|
run: |
|
||||||
if ($IsLinux) {
|
if ($IsLinux) {
|
||||||
@@ -79,11 +47,13 @@ jobs:
|
|||||||
id: setup-java
|
id: setup-java
|
||||||
with:
|
with:
|
||||||
distribution: 'jdkfile'
|
distribution: 'jdkfile'
|
||||||
jdkFile: ${{ runner.temp }}/${{ env.LocalFilename }}
|
jdk-file: ${{ runner.temp }}/${{ env.LocalFilename }}
|
||||||
java-version: '11.0.0-ea'
|
java-version: '11.0.0-ea'
|
||||||
architecture: x64
|
architecture: x64
|
||||||
- name: Verify Java version
|
- name: Verify Java version
|
||||||
run: bash __tests__/verify-java.sh "11.0" "${{ steps.setup-java.outputs.path }}"
|
env:
|
||||||
|
JAVA_PATH: ${{ steps.setup-java.outputs.path }}
|
||||||
|
run: bash __tests__/verify-java.sh "11.0" "$JAVA_PATH"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
setup-java-local-file-temurin:
|
setup-java-local-file-temurin:
|
||||||
@@ -95,7 +65,9 @@ jobs:
|
|||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
- name: Download Eclipse Temurin file
|
- name: Download Eclipse Temurin file
|
||||||
run: |
|
run: |
|
||||||
if ($IsLinux) {
|
if ($IsLinux) {
|
||||||
@@ -116,9 +88,12 @@ jobs:
|
|||||||
id: setup-java
|
id: setup-java
|
||||||
with:
|
with:
|
||||||
distribution: 'jdkfile'
|
distribution: 'jdkfile'
|
||||||
|
# Intentionally uses the deprecated `jdkFile` alias to keep it covered.
|
||||||
jdkFile: ${{ runner.temp }}/${{ env.LocalFilename }}
|
jdkFile: ${{ runner.temp }}/${{ env.LocalFilename }}
|
||||||
java-version: '11.0.0-ea'
|
java-version: '11.0.0-ea'
|
||||||
architecture: x64
|
architecture: x64
|
||||||
- name: Verify Java version
|
- name: Verify Java version
|
||||||
run: bash __tests__/verify-java.sh "11.0.12" "${{ steps.setup-java.outputs.path }}"
|
env:
|
||||||
|
JAVA_PATH: ${{ steps.setup-java.outputs.path }}
|
||||||
|
run: bash __tests__/verify-java.sh "11.0.12" "$JAVA_PATH"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|||||||
@@ -11,6 +11,9 @@ on:
|
|||||||
paths-ignore:
|
paths-ignore:
|
||||||
- '**.md'
|
- '**.md'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
@@ -25,29 +28,43 @@ jobs:
|
|||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
- name: setup-java
|
- name: setup-java
|
||||||
uses: ./
|
uses: ./
|
||||||
id: setup-java
|
id: setup-java
|
||||||
with:
|
with:
|
||||||
distribution: 'adopt'
|
distribution: 'temurin'
|
||||||
java-version: '11'
|
java-version: '11'
|
||||||
server-id: maven
|
server-id: maven
|
||||||
server-username: MAVEN_USERNAME
|
server-username-env-var: MAVEN_USERNAME
|
||||||
server-password: MAVEN_CENTRAL_TOKEN
|
server-password-env-var: MAVEN_CENTRAL_TOKEN
|
||||||
gpg-passphrase: MAVEN_GPG_PASSPHRASE
|
gpg-passphrase-env-var: MAVEN_GPG_PASSPHRASE
|
||||||
- name: Validate settings.xml
|
- name: Validate settings.xml
|
||||||
run: |
|
run: |
|
||||||
$xmlPath = Join-Path $HOME ".m2" "settings.xml"
|
$xmlPath = Join-Path $HOME ".m2" "settings.xml"
|
||||||
Get-Content $xmlPath | ForEach-Object { Write-Host $_ }
|
Get-Content $xmlPath | ForEach-Object { Write-Host $_ }
|
||||||
|
|
||||||
[xml]$xml = Get-Content $xmlPath
|
$content = [System.IO.File]::ReadAllText($xmlPath)
|
||||||
$servers = $xml.settings.servers.server
|
$expected = @(
|
||||||
if (($servers[0].id -ne 'maven') -or ($servers[0].username -ne '${env.MAVEN_USERNAME}') -or ($servers[0].password -ne '${env.MAVEN_CENTRAL_TOKEN}')) {
|
'<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"'
|
||||||
throw "Generated XML file is incorrect"
|
' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'
|
||||||
}
|
' xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">'
|
||||||
|
' <interactiveMode>false</interactiveMode>'
|
||||||
|
' <servers>'
|
||||||
|
' <server>'
|
||||||
|
' <id>maven</id>'
|
||||||
|
' <username>${env.MAVEN_USERNAME}</username>'
|
||||||
|
' <password>${env.MAVEN_CENTRAL_TOKEN}</password>'
|
||||||
|
' </server>'
|
||||||
|
' </servers>'
|
||||||
|
'</settings>'
|
||||||
|
) -join "`n"
|
||||||
|
|
||||||
if (($servers[1].id -ne 'gpg.passphrase') -or ($servers[1].passphrase -ne '${env.MAVEN_GPG_PASSPHRASE}')) {
|
if ($content -ne $expected) {
|
||||||
|
Write-Host "Expected settings.xml:"
|
||||||
|
$expected -split "`n" | ForEach-Object { Write-Host $_ }
|
||||||
throw "Generated XML file is incorrect"
|
throw "Generated XML file is incorrect"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -60,7 +77,9 @@ jobs:
|
|||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
- name: Create fake settings.xml
|
- name: Create fake settings.xml
|
||||||
run: |
|
run: |
|
||||||
$xmlDirectory = Join-Path $HOME ".m2"
|
$xmlDirectory = Join-Path $HOME ".m2"
|
||||||
@@ -71,12 +90,12 @@ jobs:
|
|||||||
uses: ./
|
uses: ./
|
||||||
id: setup-java
|
id: setup-java
|
||||||
with:
|
with:
|
||||||
distribution: 'adopt'
|
distribution: 'temurin'
|
||||||
java-version: '11'
|
java-version: '11'
|
||||||
server-id: maven
|
server-id: maven
|
||||||
server-username: MAVEN_USERNAME
|
server-username-env-var: MAVEN_USERNAME
|
||||||
server-password: MAVEN_CENTRAL_TOKEN
|
server-password-env-var: MAVEN_CENTRAL_TOKEN
|
||||||
gpg-passphrase: MAVEN_GPG_PASSPHRASE
|
gpg-passphrase-env-var: MAVEN_GPG_PASSPHRASE
|
||||||
- name: Validate settings.xml is overwritten
|
- name: Validate settings.xml is overwritten
|
||||||
run: |
|
run: |
|
||||||
$xmlPath = Join-Path $HOME ".m2" "settings.xml"
|
$xmlPath = Join-Path $HOME ".m2" "settings.xml"
|
||||||
@@ -96,7 +115,9 @@ jobs:
|
|||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
- name: Create fake settings.xml
|
- name: Create fake settings.xml
|
||||||
run: |
|
run: |
|
||||||
$xmlDirectory = Join-Path $HOME ".m2"
|
$xmlDirectory = Join-Path $HOME ".m2"
|
||||||
@@ -107,13 +128,13 @@ jobs:
|
|||||||
uses: ./
|
uses: ./
|
||||||
id: setup-java
|
id: setup-java
|
||||||
with:
|
with:
|
||||||
distribution: 'adopt'
|
distribution: 'temurin'
|
||||||
java-version: '11'
|
java-version: '11'
|
||||||
server-id: maven
|
server-id: maven
|
||||||
server-username: MAVEN_USERNAME
|
server-username-env-var: MAVEN_USERNAME
|
||||||
server-password: MAVEN_CENTRAL_TOKEN
|
server-password-env-var: MAVEN_CENTRAL_TOKEN
|
||||||
overwrite-settings: false
|
overwrite-settings: false
|
||||||
gpg-passphrase: MAVEN_GPG_PASSPHRASE
|
gpg-passphrase-env-var: MAVEN_GPG_PASSPHRASE
|
||||||
- name: Validate that settings.xml is not overwritten
|
- name: Validate that settings.xml is not overwritten
|
||||||
run: |
|
run: |
|
||||||
$xmlPath = Join-Path $HOME ".m2" "settings.xml"
|
$xmlPath = Join-Path $HOME ".m2" "settings.xml"
|
||||||
@@ -133,17 +154,19 @@ jobs:
|
|||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
- name: setup-java
|
- name: setup-java
|
||||||
uses: ./
|
uses: ./
|
||||||
id: setup-java
|
id: setup-java
|
||||||
with:
|
with:
|
||||||
distribution: 'adopt'
|
distribution: 'temurin'
|
||||||
java-version: '11'
|
java-version: '11'
|
||||||
server-id: maven
|
server-id: maven
|
||||||
server-username: MAVEN_USERNAME
|
server-username-env-var: MAVEN_USERNAME
|
||||||
server-password: MAVEN_CENTRAL_TOKEN
|
server-password-env-var: MAVEN_CENTRAL_TOKEN
|
||||||
gpg-passphrase: MAVEN_GPG_PASSPHRASE
|
gpg-passphrase-env-var: MAVEN_GPG_PASSPHRASE
|
||||||
settings-path: ${{ runner.temp }}
|
settings-path: ${{ runner.temp }}
|
||||||
- name: Validate settings.xml location
|
- name: Validate settings.xml location
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -0,0 +1,87 @@
|
|||||||
|
name: Validate Java e2e smoke
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
pull_request:
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
setup-java:
|
||||||
|
name: ${{ matrix.distribution }} ${{ matrix.version }} (${{ matrix.java-package }}) - ${{ matrix.os }}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: macos-latest
|
||||||
|
distribution: temurin
|
||||||
|
version: '11'
|
||||||
|
java-package: jdk
|
||||||
|
- os: windows-latest
|
||||||
|
distribution: temurin
|
||||||
|
version: '17'
|
||||||
|
java-package: jdk
|
||||||
|
- os: ubuntu-latest
|
||||||
|
distribution: temurin
|
||||||
|
version: '21'
|
||||||
|
java-package: jdk
|
||||||
|
- os: macos-latest
|
||||||
|
distribution: temurin
|
||||||
|
version: '25'
|
||||||
|
java-package: jdk
|
||||||
|
- os: windows-latest
|
||||||
|
distribution: temurin
|
||||||
|
version: '25'
|
||||||
|
java-package: jdk
|
||||||
|
- os: ubuntu-latest
|
||||||
|
distribution: temurin
|
||||||
|
version: '25'
|
||||||
|
java-package: jdk
|
||||||
|
- os: macos-latest
|
||||||
|
distribution: microsoft
|
||||||
|
version: '25'
|
||||||
|
java-package: jdk
|
||||||
|
- os: windows-latest
|
||||||
|
distribution: microsoft
|
||||||
|
version: '25'
|
||||||
|
java-package: jdk
|
||||||
|
- os: ubuntu-latest
|
||||||
|
distribution: microsoft
|
||||||
|
version: '25'
|
||||||
|
java-package: jdk
|
||||||
|
- os: ubuntu-latest
|
||||||
|
distribution: zulu
|
||||||
|
version: '17'
|
||||||
|
java-package: jre
|
||||||
|
- os: ubuntu-latest
|
||||||
|
distribution: liberica
|
||||||
|
version: '21'
|
||||||
|
java-package: jdk+fx
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: setup-java
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
java-version: ${{ matrix.version }}
|
||||||
|
java-package: ${{ matrix.java-package }}
|
||||||
|
distribution: ${{ matrix.distribution }}
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Verify Java
|
||||||
|
env:
|
||||||
|
JAVA_VERSION: ${{ matrix.version }}
|
||||||
|
JAVA_PATH: ${{ steps.setup-java.outputs.path }}
|
||||||
|
run: bash __tests__/verify-java.sh "$JAVA_VERSION" "$JAVA_PATH"
|
||||||
|
shell: bash
|
||||||
@@ -3,55 +3,159 @@ name: Validate Java e2e
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
|
||||||
- releases/*
|
- releases/*
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- '**.md'
|
- '**.md'
|
||||||
pull_request:
|
|
||||||
paths-ignore:
|
|
||||||
- '**.md'
|
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 */12 * * *'
|
- cron: '0 */12 * * *'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
setup-java-major-versions:
|
setup-java-major-versions:
|
||||||
name: ${{ matrix.distribution }} ${{ matrix.version }} (jdk-x64) - ${{ matrix.os }}
|
name: ${{ matrix.distribution }} ${{ matrix.version }} (jdk-${{ contains(matrix.os, 'macos') && !contains(matrix.os, 'intel') && 'arm64' || 'x64' }}) - ${{ matrix.os }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-13, windows-latest, ubuntu-latest]
|
os: [macos-15-intel, windows-latest, ubuntu-latest]
|
||||||
distribution: [
|
distribution:
|
||||||
|
[
|
||||||
'temurin',
|
'temurin',
|
||||||
'adopt',
|
|
||||||
'adopt-openj9',
|
|
||||||
'zulu',
|
'zulu',
|
||||||
'liberica',
|
'liberica',
|
||||||
'microsoft',
|
'microsoft',
|
||||||
'semeru',
|
'semeru',
|
||||||
'corretto',
|
'corretto',
|
||||||
'dragonwell'
|
'dragonwell',
|
||||||
] # internally 'adopt-hotspot' is the same as 'adopt'
|
'sapmachine',
|
||||||
|
'jetbrains',
|
||||||
|
'kona',
|
||||||
|
'liberica-nik'
|
||||||
|
]
|
||||||
version: ['21', '11', '17']
|
version: ['21', '11', '17']
|
||||||
exclude:
|
exclude:
|
||||||
- distribution: microsoft
|
- distribution: microsoft
|
||||||
version: 8
|
version: 8
|
||||||
- distribution: dragonwell
|
- distribution: dragonwell
|
||||||
os: macos-13
|
os: macos-15-intel
|
||||||
include:
|
include:
|
||||||
|
- distribution: microsoft
|
||||||
|
os: windows-latest
|
||||||
|
version: 25
|
||||||
|
- distribution: microsoft
|
||||||
|
os: ubuntu-latest
|
||||||
|
version: 25
|
||||||
|
- distribution: microsoft
|
||||||
|
os: macos-latest
|
||||||
|
version: 25
|
||||||
|
- distribution: kona
|
||||||
|
os: windows-latest
|
||||||
|
version: 25
|
||||||
|
- distribution: kona
|
||||||
|
os: ubuntu-latest
|
||||||
|
version: 25
|
||||||
|
- distribution: kona
|
||||||
|
os: macos-latest
|
||||||
|
version: 25
|
||||||
|
- distribution: liberica-nik
|
||||||
|
os: windows-latest
|
||||||
|
version: 25
|
||||||
|
- distribution: liberica-nik
|
||||||
|
os: ubuntu-latest
|
||||||
|
version: 25
|
||||||
|
- distribution: liberica-nik
|
||||||
|
os: macos-latest
|
||||||
|
version: 25
|
||||||
- distribution: oracle
|
- distribution: oracle
|
||||||
os: macos-13
|
os: macos-15-intel
|
||||||
version: 17
|
version: 21
|
||||||
- distribution: oracle
|
- distribution: oracle
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
version: 20
|
version: 21
|
||||||
- distribution: oracle
|
- distribution: oracle
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
version: 20
|
version: 21
|
||||||
|
- distribution: oracle-openjdk
|
||||||
|
os: macos-15-intel
|
||||||
|
version: 21
|
||||||
|
- distribution: oracle-openjdk
|
||||||
|
os: windows-latest
|
||||||
|
version: 21
|
||||||
|
- distribution: oracle-openjdk
|
||||||
|
os: ubuntu-latest
|
||||||
|
version: 21
|
||||||
|
- distribution: graalvm
|
||||||
|
os: macos-latest
|
||||||
|
version: 17.0.12
|
||||||
|
- distribution: graalvm
|
||||||
|
os: windows-latest
|
||||||
|
version: 21
|
||||||
|
- distribution: graalvm
|
||||||
|
os: ubuntu-latest
|
||||||
|
version: 21
|
||||||
|
- distribution: graalvm
|
||||||
|
os: ubuntu-latest
|
||||||
|
version: '24-ea'
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- &checkout_step
|
||||||
uses: actions/checkout@v4
|
name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: setup-java
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
java-version: ${{ matrix.version }}
|
||||||
|
distribution: ${{ matrix.distribution }}
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Verify Java
|
||||||
|
env:
|
||||||
|
JAVA_VERSION: ${{ matrix.version }}
|
||||||
|
JAVA_PATH: ${{ steps.setup-java.outputs.path }}
|
||||||
|
SETUP_JAVA_VERSION: ${{ steps.setup-java.outputs.version }}
|
||||||
|
REQUIRE_CONCRETE_VERSION: ${{ (matrix.distribution == 'oracle' || matrix.distribution == 'graalvm') && !contains(matrix.version, '.') && !contains(matrix.version, '-ea') }}
|
||||||
|
run: bash __tests__/verify-java.sh "$JAVA_VERSION" "$JAVA_PATH" "$SETUP_JAVA_VERSION" "$REQUIRE_CONCRETE_VERSION"
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
setup-java-checksum-verification:
|
||||||
|
name: Corretto checksum verification - ubuntu-latest
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- *checkout_step
|
||||||
|
- name: setup-java with forced download
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
java-version: '21'
|
||||||
|
distribution: corretto
|
||||||
|
force-download: true
|
||||||
|
- name: Verify Java
|
||||||
|
env:
|
||||||
|
JAVA_VERSION: '21'
|
||||||
|
JAVA_PATH: ${{ steps.setup-java.outputs.path }}
|
||||||
|
run: bash __tests__/verify-java.sh "$JAVA_VERSION" "$JAVA_PATH"
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
setup-java-alpine-linux:
|
||||||
|
name: ${{ matrix.distribution }} ${{ matrix.version }} (jdk-${{ contains(matrix.os, 'macos') && !contains(matrix.os, 'intel') && 'arm64' || 'x64' }}) - alpine-linux - ${{ matrix.os }}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
container:
|
||||||
|
image: alpine:3.21
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest]
|
||||||
|
distribution: ['temurin', 'sapmachine']
|
||||||
|
version: ['21', '17']
|
||||||
|
steps:
|
||||||
|
- *checkout_step
|
||||||
|
- name: Install bash
|
||||||
|
run: apk add --no-cache bash
|
||||||
- name: setup-java
|
- name: setup-java
|
||||||
uses: ./
|
uses: ./
|
||||||
id: setup-java
|
id: setup-java
|
||||||
@@ -59,17 +163,20 @@ jobs:
|
|||||||
java-version: ${{ matrix.version }}
|
java-version: ${{ matrix.version }}
|
||||||
distribution: ${{ matrix.distribution }}
|
distribution: ${{ matrix.distribution }}
|
||||||
- name: Verify Java
|
- name: Verify Java
|
||||||
run: bash __tests__/verify-java.sh "${{ matrix.version }}" "${{ steps.setup-java.outputs.path }}"
|
env:
|
||||||
|
JAVA_VERSION: ${{ matrix.version }}
|
||||||
|
JAVA_PATH: ${{ steps.setup-java.outputs.path }}
|
||||||
|
run: bash __tests__/verify-java.sh "$JAVA_VERSION" "$JAVA_PATH"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
setup-java-major-minor-versions:
|
setup-java-major-minor-versions:
|
||||||
name: ${{ matrix.distribution }} ${{ matrix.version }} (jdk-x64) - ${{ matrix.os }}
|
name: ${{ matrix.distribution }} ${{ matrix.version }} (jdk-${{ contains(matrix.os, 'macos') && !contains(matrix.os, 'intel') && 'arm64' || 'x64' }}) - ${{ matrix.os }}
|
||||||
needs: setup-java-major-versions
|
needs: setup-java-major-versions
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: &default_os [macos-latest, windows-latest, ubuntu-latest]
|
||||||
distribution: ['temurin', 'zulu', 'liberica']
|
distribution: ['temurin', 'zulu', 'liberica']
|
||||||
version:
|
version:
|
||||||
- '11.0'
|
- '11.0'
|
||||||
@@ -78,16 +185,27 @@ jobs:
|
|||||||
include:
|
include:
|
||||||
- distribution: oracle
|
- distribution: oracle
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
version: '20.0.1'
|
version: '21.0.4'
|
||||||
|
- distribution: graalvm
|
||||||
|
os: ubuntu-latest
|
||||||
|
version: '21.0.4'
|
||||||
- distribution: dragonwell
|
- distribution: dragonwell
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
version: '11.0'
|
version: '11.0'
|
||||||
- distribution: dragonwell
|
- distribution: dragonwell
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
version: '11.0.13+9'
|
version: '11.0.13+9'
|
||||||
|
- distribution: sapmachine
|
||||||
|
os: ubuntu-latest
|
||||||
|
version: '17.0.7'
|
||||||
|
- distribution: jetbrains
|
||||||
|
os: ubuntu-latest
|
||||||
|
version: '11.0.11'
|
||||||
|
- distribution: jetbrains
|
||||||
|
os: ubuntu-latest
|
||||||
|
version: '17.0.7'
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- *checkout_step
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: setup-java
|
- name: setup-java
|
||||||
uses: ./
|
uses: ./
|
||||||
id: setup-java
|
id: setup-java
|
||||||
@@ -95,7 +213,11 @@ jobs:
|
|||||||
java-version: ${{ matrix.version }}
|
java-version: ${{ matrix.version }}
|
||||||
distribution: ${{ matrix.distribution }}
|
distribution: ${{ matrix.distribution }}
|
||||||
- name: Verify Java
|
- name: Verify Java
|
||||||
run: bash __tests__/verify-java.sh "${{ matrix.version }}" "${{ steps.setup-java.outputs.path }}"
|
env:
|
||||||
|
JAVA_VERSION: ${{ matrix.version }}
|
||||||
|
JAVA_PATH: ${{ steps.setup-java.outputs.path }}
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: bash __tests__/verify-java.sh "$JAVA_VERSION" "$JAVA_PATH"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
setup-java-check-latest:
|
setup-java-check-latest:
|
||||||
@@ -105,14 +227,21 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: *default_os
|
||||||
distribution: ['temurin', 'zulu', 'liberica', 'dragonwell']
|
distribution:
|
||||||
|
[
|
||||||
|
'temurin',
|
||||||
|
'zulu',
|
||||||
|
'liberica',
|
||||||
|
'dragonwell',
|
||||||
|
'sapmachine',
|
||||||
|
'jetbrains'
|
||||||
|
]
|
||||||
exclude:
|
exclude:
|
||||||
- distribution: dragonwell
|
- distribution: dragonwell
|
||||||
os: macos-latest
|
os: macos-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- *checkout_step
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: setup-java
|
- name: setup-java
|
||||||
uses: ./
|
uses: ./
|
||||||
id: setup-java
|
id: setup-java
|
||||||
@@ -120,8 +249,12 @@ jobs:
|
|||||||
distribution: ${{ matrix.distribution }}
|
distribution: ${{ matrix.distribution }}
|
||||||
java-version: 11
|
java-version: 11
|
||||||
check-latest: true
|
check-latest: true
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Verify Java
|
- name: Verify Java
|
||||||
run: bash __tests__/verify-java.sh "11" "${{ steps.setup-java.outputs.path }}"
|
env:
|
||||||
|
JAVA_PATH: ${{ steps.setup-java.outputs.path }}
|
||||||
|
run: bash __tests__/verify-java.sh "11" "$JAVA_PATH"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
setup-java-multiple-jdks:
|
setup-java-multiple-jdks:
|
||||||
@@ -131,14 +264,21 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: *default_os
|
||||||
distribution: ['temurin', 'zulu', 'liberica', 'dragonwell']
|
distribution:
|
||||||
|
[
|
||||||
|
'temurin',
|
||||||
|
'zulu',
|
||||||
|
'liberica',
|
||||||
|
'dragonwell',
|
||||||
|
'sapmachine',
|
||||||
|
'jetbrains'
|
||||||
|
]
|
||||||
exclude:
|
exclude:
|
||||||
- distribution: dragonwell
|
- distribution: dragonwell
|
||||||
os: macos-latest
|
os: macos-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- *checkout_step
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: setup-java
|
- name: setup-java
|
||||||
uses: ./
|
uses: ./
|
||||||
id: setup-java
|
id: setup-java
|
||||||
@@ -147,12 +287,15 @@ jobs:
|
|||||||
java-version: |
|
java-version: |
|
||||||
11
|
11
|
||||||
17
|
17
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Verify Java env variables
|
- name: Verify Java env variables
|
||||||
run: |
|
run: |
|
||||||
|
$javaArch = if ($env:RUNNER_ARCH -eq "ARM64") { "AARCH64" } else { $env:RUNNER_ARCH }
|
||||||
$versionsArr = "11","17"
|
$versionsArr = "11","17"
|
||||||
foreach ($version in $versionsArr)
|
foreach ($version in $versionsArr)
|
||||||
{
|
{
|
||||||
$envName = "JAVA_HOME_${version}_${env:RUNNER_ARCH}"
|
$envName = "JAVA_HOME_${version}_${javaArch}"
|
||||||
$JavaVersionPath = [Environment]::GetEnvironmentVariable($envName)
|
$JavaVersionPath = [Environment]::GetEnvironmentVariable($envName)
|
||||||
if (-not (Test-Path "$JavaVersionPath")) {
|
if (-not (Test-Path "$JavaVersionPath")) {
|
||||||
Write-Host "$envName is not found"
|
Write-Host "$envName is not found"
|
||||||
@@ -161,51 +304,73 @@ jobs:
|
|||||||
}
|
}
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
- name: Verify Java
|
- name: Verify Java
|
||||||
run: bash __tests__/verify-java.sh "17" "${{ steps.setup-java.outputs.path }}"
|
env:
|
||||||
|
JAVA_PATH: ${{ steps.setup-java.outputs.path }}
|
||||||
|
run: bash __tests__/verify-java.sh "17" "$JAVA_PATH"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
setup-java-ea-versions-zulu:
|
setup-java-ea-versions:
|
||||||
name: zulu ${{ matrix.version }} (jdk-x64) - ${{ matrix.os }}
|
name: ${{ matrix.distribution }} ${{ matrix.version }} (jdk-${{ contains(matrix.os, 'macos') && !contains(matrix.os, 'intel') && 'arm64' || 'x64' }}) - ${{ matrix.os }}
|
||||||
needs: setup-java-major-minor-versions
|
needs: setup-java-major-minor-versions
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-13, windows-latest, ubuntu-latest]
|
include:
|
||||||
version: ['17-ea', '15.0.0-ea.14']
|
- {os: macos-15-intel, version: '17-ea', distribution: zulu}
|
||||||
|
- {os: windows-latest, version: '17-ea', distribution: zulu}
|
||||||
|
- {os: ubuntu-latest, version: '17-ea', distribution: zulu}
|
||||||
|
- {os: macos-15-intel, version: '15.0.0-ea.14', distribution: zulu}
|
||||||
|
- {os: windows-latest, version: '15.0.0-ea.14', distribution: zulu}
|
||||||
|
- {os: ubuntu-latest, version: '15.0.0-ea.14', distribution: zulu}
|
||||||
|
- {os: macos-latest, version: '17-ea', distribution: temurin}
|
||||||
|
- {os: windows-latest, version: '17-ea', distribution: temurin}
|
||||||
|
- {os: ubuntu-latest, version: '17-ea', distribution: temurin}
|
||||||
|
- {os: macos-latest, version: '17-ea', distribution: sapmachine}
|
||||||
|
- {os: windows-latest, version: '17-ea', distribution: sapmachine}
|
||||||
|
- {os: ubuntu-latest, version: '17-ea', distribution: sapmachine}
|
||||||
|
- {os: macos-latest, version: '21-ea', distribution: sapmachine}
|
||||||
|
- {os: windows-latest, version: '21-ea', distribution: sapmachine}
|
||||||
|
- {os: ubuntu-latest, version: '21-ea', distribution: sapmachine}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- *checkout_step
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: setup-java
|
- name: setup-java
|
||||||
uses: ./
|
uses: ./
|
||||||
id: setup-java
|
id: setup-java
|
||||||
with:
|
with:
|
||||||
java-version: ${{ matrix.version }}
|
java-version: ${{ matrix.version }}
|
||||||
distribution: zulu
|
distribution: ${{ matrix.distribution }}
|
||||||
- name: Verify Java
|
- name: Verify Java
|
||||||
run: bash __tests__/verify-java.sh "${{ matrix.version }}" "${{ steps.setup-java.outputs.path }}"
|
env:
|
||||||
|
JAVA_VERSION: ${{ matrix.version }}
|
||||||
|
JAVA_PATH: ${{ steps.setup-java.outputs.path }}
|
||||||
|
run: bash __tests__/verify-java.sh "$JAVA_VERSION" "$JAVA_PATH"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
setup-java-ea-versions-temurin:
|
setup-java-signature-verification:
|
||||||
name: temurin ${{ matrix.version }} (jdk-x64) - ${{ matrix.os }}
|
name: ${{ matrix.distribution }} ${{ matrix.version }} signature verification - ${{ matrix.os }}
|
||||||
needs: setup-java-major-minor-versions
|
needs: setup-java-major-minor-versions
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: *default_os
|
||||||
version: ['17-ea']
|
version: ['21', '17']
|
||||||
|
distribution: [temurin, microsoft]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- *checkout_step
|
||||||
uses: actions/checkout@v4
|
- name: setup-java with signature verification
|
||||||
- name: setup-java
|
|
||||||
uses: ./
|
uses: ./
|
||||||
id: setup-java
|
id: setup-java
|
||||||
with:
|
with:
|
||||||
java-version: ${{ matrix.version }}
|
java-version: ${{ matrix.version }}
|
||||||
distribution: temurin
|
distribution: ${{ matrix.distribution }}
|
||||||
|
verify-signature: true
|
||||||
- name: Verify Java
|
- name: Verify Java
|
||||||
run: bash __tests__/verify-java.sh "${{ matrix.version }}" "${{ steps.setup-java.outputs.path }}"
|
env:
|
||||||
|
JAVA_VERSION: ${{ matrix.version }}
|
||||||
|
JAVA_PATH: ${{ steps.setup-java.outputs.path }}
|
||||||
|
run: bash __tests__/verify-java.sh "$JAVA_VERSION" "$JAVA_PATH"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
setup-java-custom-package-type:
|
setup-java-custom-package-type:
|
||||||
@@ -215,8 +380,9 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-13, windows-latest, ubuntu-latest]
|
os: [macos-15-intel, windows-latest, ubuntu-latest]
|
||||||
distribution: ['temurin', 'zulu', 'liberica', 'semeru']
|
distribution:
|
||||||
|
['temurin', 'zulu', 'liberica', 'semeru', 'sapmachine', 'jetbrains']
|
||||||
java-package: ['jre']
|
java-package: ['jre']
|
||||||
version: ['17.0']
|
version: ['17.0']
|
||||||
include:
|
include:
|
||||||
@@ -236,13 +402,57 @@ jobs:
|
|||||||
java-package: jre+fx
|
java-package: jre+fx
|
||||||
version: '11'
|
version: '11'
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
|
- distribution: 'liberica-nik'
|
||||||
|
java-package: jdk+fx
|
||||||
|
version: '21'
|
||||||
|
os: ubuntu-latest
|
||||||
- distribution: 'corretto'
|
- distribution: 'corretto'
|
||||||
java-package: jre
|
java-package: jre
|
||||||
version: '8'
|
version: '8'
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
|
- distribution: 'jetbrains'
|
||||||
|
java-package: jdk+jcef
|
||||||
|
version: '11'
|
||||||
|
os: ubuntu-latest
|
||||||
|
- distribution: 'jetbrains'
|
||||||
|
java-package: jdk+jcef
|
||||||
|
version: '17'
|
||||||
|
os: ubuntu-latest
|
||||||
|
- distribution: 'jetbrains'
|
||||||
|
java-package: jdk+jcef
|
||||||
|
version: '21'
|
||||||
|
os: ubuntu-latest
|
||||||
|
- distribution: 'jetbrains'
|
||||||
|
java-package: jre+jcef
|
||||||
|
version: '11'
|
||||||
|
os: ubuntu-latest
|
||||||
|
- distribution: 'jetbrains'
|
||||||
|
java-package: jre+jcef
|
||||||
|
version: '17'
|
||||||
|
os: ubuntu-latest
|
||||||
|
- distribution: 'jetbrains'
|
||||||
|
java-package: jre+jcef
|
||||||
|
version: '21'
|
||||||
|
os: ubuntu-latest
|
||||||
|
- distribution: 'jetbrains'
|
||||||
|
java-package: jdk+ft
|
||||||
|
version: '17'
|
||||||
|
os: ubuntu-latest
|
||||||
|
- distribution: 'jetbrains'
|
||||||
|
java-package: jdk+ft
|
||||||
|
version: '21'
|
||||||
|
os: ubuntu-latest
|
||||||
|
- distribution: 'jetbrains'
|
||||||
|
java-package: jre+ft
|
||||||
|
version: '17'
|
||||||
|
os: ubuntu-latest
|
||||||
|
- distribution: 'jetbrains'
|
||||||
|
java-package: jre+ft
|
||||||
|
version: '21'
|
||||||
|
os: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- *checkout_step
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: setup-java
|
- name: setup-java
|
||||||
uses: ./
|
uses: ./
|
||||||
id: setup-java
|
id: setup-java
|
||||||
@@ -250,8 +460,13 @@ jobs:
|
|||||||
java-version: ${{ matrix.version }}
|
java-version: ${{ matrix.version }}
|
||||||
java-package: ${{ matrix.java-package }}
|
java-package: ${{ matrix.java-package }}
|
||||||
distribution: ${{ matrix.distribution }}
|
distribution: ${{ matrix.distribution }}
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Verify Java
|
- name: Verify Java
|
||||||
run: bash __tests__/verify-java.sh "${{ matrix.version }}" "${{ steps.setup-java.outputs.path }}"
|
env:
|
||||||
|
JAVA_VERSION: ${{ matrix.version }}
|
||||||
|
JAVA_PATH: ${{ steps.setup-java.outputs.path }}
|
||||||
|
run: bash __tests__/verify-java.sh "$JAVA_VERSION" "$JAVA_PATH"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
# Only Liberica and Zulu provide x86
|
# Only Liberica and Zulu provide x86
|
||||||
@@ -263,12 +478,11 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
# x86 is not supported on macOS
|
# x86 is not supported on macOS
|
||||||
os: [windows-latest, ubuntu-latest]
|
os: [windows-latest, ubuntu-22.04]
|
||||||
distribution: ['liberica', 'zulu', 'corretto']
|
distribution: ['liberica', 'zulu', 'corretto']
|
||||||
version: ['11']
|
version: ['11']
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- *checkout_step
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: setup-java
|
- name: setup-java
|
||||||
uses: ./
|
uses: ./
|
||||||
id: setup-java
|
id: setup-java
|
||||||
@@ -277,21 +491,42 @@ jobs:
|
|||||||
java-version: ${{ matrix.version }}
|
java-version: ${{ matrix.version }}
|
||||||
architecture: 'x86'
|
architecture: 'x86'
|
||||||
- name: Verify Java
|
- name: Verify Java
|
||||||
run: bash __tests__/verify-java.sh "${{ matrix.version }}" "${{ steps.setup-java.outputs.path }}"
|
env:
|
||||||
|
JAVA_VERSION: ${{ matrix.version }}
|
||||||
|
JAVA_PATH: ${{ steps.setup-java.outputs.path }}
|
||||||
|
run: bash __tests__/verify-java.sh "$JAVA_VERSION" "$JAVA_PATH"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
|
setup-java-unsupported-platform:
|
||||||
|
name: Reject unsupported Oracle x86 on Linux
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- *checkout_step
|
||||||
|
- name: Attempt unsupported setup
|
||||||
|
id: unsupported-setup
|
||||||
|
continue-on-error: true
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
distribution: oracle
|
||||||
|
java-version: '21'
|
||||||
|
architecture: x86
|
||||||
|
- name: Verify setup was rejected
|
||||||
|
if: always()
|
||||||
|
env:
|
||||||
|
SETUP_OUTCOME: ${{ steps.unsupported-setup.outcome }}
|
||||||
|
run: test "$SETUP_OUTCOME" = failure
|
||||||
|
|
||||||
setup-java-version-both-version-inputs-presents:
|
setup-java-version-both-version-inputs-presents:
|
||||||
name: ${{ matrix.distribution }} version (should be from input) - ${{ matrix.os }}
|
name: ${{ matrix.distribution }} version (should be from input) - ${{ matrix.os }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: *default_os
|
||||||
distribution: ['temurin', 'microsoft', 'corretto']
|
distribution: ['temurin', 'microsoft', 'corretto']
|
||||||
java-version-file: ['.java-version', '.tool-versions']
|
java-version-file: ['.java-version', '.tool-versions']
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- *checkout_step
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Create .java-version file
|
- name: Create .java-version file
|
||||||
shell: bash
|
shell: bash
|
||||||
run: echo "17" > .java-version
|
run: echo "17" > .java-version
|
||||||
@@ -306,7 +541,9 @@ jobs:
|
|||||||
java-version: 11
|
java-version: 11
|
||||||
java-version-file: ${{matrix.java-version-file }}
|
java-version-file: ${{matrix.java-version-file }}
|
||||||
- name: Verify Java
|
- name: Verify Java
|
||||||
run: bash __tests__/verify-java.sh "11" "${{ steps.setup-java.outputs.path }}"
|
env:
|
||||||
|
JAVA_PATH: ${{ steps.setup-java.outputs.path }}
|
||||||
|
run: bash __tests__/verify-java.sh "11" "$JAVA_PATH"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
setup-java-version-from-file-major-notation:
|
setup-java-version-from-file-major-notation:
|
||||||
@@ -315,12 +552,11 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: *default_os
|
||||||
distribution: ['temurin', 'zulu', 'liberica', 'microsoft', 'corretto']
|
distribution: ['temurin', 'zulu', 'liberica', 'microsoft', 'corretto']
|
||||||
java-version-file: ['.java-version', '.tool-versions']
|
java-version-file: ['.java-version', '.tool-versions']
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- *checkout_step
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Create .java-version file
|
- name: Create .java-version file
|
||||||
shell: bash
|
shell: bash
|
||||||
run: echo "11" > .java-version
|
run: echo "11" > .java-version
|
||||||
@@ -334,7 +570,9 @@ jobs:
|
|||||||
distribution: ${{ matrix.distribution }}
|
distribution: ${{ matrix.distribution }}
|
||||||
java-version-file: ${{matrix.java-version-file }}
|
java-version-file: ${{matrix.java-version-file }}
|
||||||
- name: Verify Java
|
- name: Verify Java
|
||||||
run: bash __tests__/verify-java.sh "11" "${{ steps.setup-java.outputs.path }}"
|
env:
|
||||||
|
JAVA_PATH: ${{ steps.setup-java.outputs.path }}
|
||||||
|
run: bash __tests__/verify-java.sh "11" "$JAVA_PATH"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
setup-java-version-from-file-major-minor-patch-notation:
|
setup-java-version-from-file-major-minor-patch-notation:
|
||||||
@@ -343,12 +581,11 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: *default_os
|
||||||
distribution: ['adopt', 'adopt-openj9', 'zulu']
|
distribution: ['temurin', 'zulu']
|
||||||
java-version-file: ['.java-version', '.tool-versions']
|
java-version-file: ['.java-version', '.tool-versions']
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- *checkout_step
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Create .java-version file
|
- name: Create .java-version file
|
||||||
shell: bash
|
shell: bash
|
||||||
run: echo "17.0.10" > .java-version
|
run: echo "17.0.10" > .java-version
|
||||||
@@ -362,27 +599,31 @@ jobs:
|
|||||||
distribution: ${{ matrix.distribution }}
|
distribution: ${{ matrix.distribution }}
|
||||||
java-version-file: ${{matrix.java-version-file }}
|
java-version-file: ${{matrix.java-version-file }}
|
||||||
- name: Verify Java
|
- name: Verify Java
|
||||||
run: bash __tests__/verify-java.sh "17.0.10" "${{ steps.setup-java.outputs.path }}"
|
env:
|
||||||
|
JAVA_PATH: ${{ steps.setup-java.outputs.path }}
|
||||||
|
run: bash __tests__/verify-java.sh "17.0.10" "$JAVA_PATH"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
setup-java-version-from-file-major-minor-patch-with-dist:
|
setup-java-version-from-file-major-minor-patch-with-dist:
|
||||||
name: ${{ matrix.distribution }} version from file 'openjdk64-17.0.10' - ${{ matrix.os }}
|
name: ${{ matrix.distribution }} version from file '${{ matrix.java-version-file }}' - ${{ matrix.os }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: *default_os
|
||||||
distribution: ['adopt', 'zulu', 'liberica']
|
distribution: ['temurin', 'zulu', 'liberica']
|
||||||
java-version-file: ['.java-version', '.tool-versions']
|
java-version-file: ['.java-version', '.tool-versions', '.sdkmanrc']
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- *checkout_step
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Create .java-version file
|
- name: Create .java-version file
|
||||||
shell: bash
|
shell: bash
|
||||||
run: echo "openjdk64-17.0.10" > .java-version
|
run: echo "openjdk64-17.0.10" > .java-version
|
||||||
- name: Create .tool-versions file
|
- name: Create .tool-versions file
|
||||||
shell: bash
|
shell: bash
|
||||||
run: echo "java openjdk64-17.0.10" > .tool-versions
|
run: echo "java openjdk64-17.0.10" > .tool-versions
|
||||||
|
- name: Create .sdkmanrc file
|
||||||
|
shell: bash
|
||||||
|
run: echo "java=17.0.10-tem" > .sdkmanrc
|
||||||
- name: setup-java
|
- name: setup-java
|
||||||
uses: ./
|
uses: ./
|
||||||
id: setup-java
|
id: setup-java
|
||||||
@@ -390,5 +631,106 @@ jobs:
|
|||||||
distribution: ${{ matrix.distribution }}
|
distribution: ${{ matrix.distribution }}
|
||||||
java-version-file: ${{matrix.java-version-file }}
|
java-version-file: ${{matrix.java-version-file }}
|
||||||
- name: Verify Java
|
- name: Verify Java
|
||||||
run: bash __tests__/verify-java.sh "17.0.10" "${{ steps.setup-java.outputs.path }}"
|
env:
|
||||||
|
JAVA_PATH: ${{ steps.setup-java.outputs.path }}
|
||||||
|
run: bash __tests__/verify-java.sh "17.0.10" "$JAVA_PATH"
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
setup-java-version-from-sdkman-major:
|
||||||
|
name: temurin 26 from .sdkmanrc - ubuntu-latest
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- *checkout_step
|
||||||
|
- name: Create SDKMAN and Gradle files
|
||||||
|
run: |
|
||||||
|
echo "java=26-tem" > .sdkmanrc
|
||||||
|
touch build.gradle
|
||||||
|
- name: setup-java
|
||||||
|
uses: ./
|
||||||
|
id: setup-java
|
||||||
|
with:
|
||||||
|
java-version-file: .sdkmanrc
|
||||||
|
cache: gradle
|
||||||
|
- name: Verify Java
|
||||||
|
env:
|
||||||
|
JAVA_PATH: ${{ steps.setup-java.outputs.path }}
|
||||||
|
run: bash __tests__/verify-java.sh "26" "$JAVA_PATH"
|
||||||
|
|
||||||
|
setup-java-set-default:
|
||||||
|
name: set-default option - ${{ matrix.os }}
|
||||||
|
needs: setup-java-major-versions
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: *default_os
|
||||||
|
steps:
|
||||||
|
- *checkout_step
|
||||||
|
- name: Setup Java 17 as default
|
||||||
|
uses: ./
|
||||||
|
id: setup-java-17
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '17'
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Setup Java 21 without setting as default
|
||||||
|
uses: ./
|
||||||
|
id: setup-java-21
|
||||||
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
|
java-version: '21'
|
||||||
|
set-default: false
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Verify JAVA_HOME still points to Java 17
|
||||||
|
env:
|
||||||
|
JAVA_17_PATH: ${{ steps.setup-java-17.outputs.path }}
|
||||||
|
run: |
|
||||||
|
echo "JAVA_HOME=$JAVA_HOME"
|
||||||
|
echo "Java 17 path=$JAVA_17_PATH"
|
||||||
|
if [ "$JAVA_HOME" != "$JAVA_17_PATH" ]; then
|
||||||
|
echo "JAVA_HOME should still point to Java 17"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
shell: bash
|
||||||
|
- name: Verify java -version reports Java 17
|
||||||
|
run: |
|
||||||
|
JAVA_VERSION=$(java -version 2>&1 | head -1)
|
||||||
|
echo "java -version: $JAVA_VERSION"
|
||||||
|
if ! echo "$JAVA_VERSION" | grep -q "17"; then
|
||||||
|
echo "Default java should still be version 17"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
shell: bash
|
||||||
|
- name: Verify JAVA_HOME_21 env var is set
|
||||||
|
run: |
|
||||||
|
$javaArch = if ($env:RUNNER_ARCH -eq "ARM64") { "AARCH64" } else { $env:RUNNER_ARCH }
|
||||||
|
$envName = "JAVA_HOME_21_${javaArch}"
|
||||||
|
$JavaVersionPath = [Environment]::GetEnvironmentVariable($envName)
|
||||||
|
if (-not $JavaVersionPath) {
|
||||||
|
Write-Host "$envName is not set"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
if (-not (Test-Path "$JavaVersionPath")) {
|
||||||
|
Write-Host "$envName path does not exist: $JavaVersionPath"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
Write-Host "$envName=$JavaVersionPath"
|
||||||
|
shell: pwsh
|
||||||
|
- name: Verify Java 21 outputs are set
|
||||||
|
env:
|
||||||
|
JAVA_21_PATH: ${{ steps.setup-java-21.outputs.path }}
|
||||||
|
JAVA_21_VERSION: ${{ steps.setup-java-21.outputs.version }}
|
||||||
|
run: |
|
||||||
|
echo "Java 21 path=$JAVA_21_PATH"
|
||||||
|
echo "Java 21 version=$JAVA_21_VERSION"
|
||||||
|
if [ -z "$JAVA_21_PATH" ]; then
|
||||||
|
echo "Java 21 path output should be set"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ -z "$JAVA_21_VERSION" ]; then
|
||||||
|
echo "Java 21 version output should be set"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|||||||
@@ -9,6 +9,9 @@ on:
|
|||||||
- main
|
- main
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
call-licensed:
|
call-licensed:
|
||||||
name: Licensed
|
name: Licensed
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
name: 'Publish Immutable Action Version'
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [released]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
id-token: write
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checking out
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Publish
|
||||||
|
id: publish
|
||||||
|
uses: actions/publish-immutable-action@v0.0.4
|
||||||
@@ -23,7 +23,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Update the ${{ env.TAG_NAME }} tag
|
- name: Update the ${{ env.TAG_NAME }} tag
|
||||||
id: update-major-tag
|
id: update-major-tag
|
||||||
uses: actions/publish-action@v0.2.2
|
uses: actions/publish-action@v0.4.0
|
||||||
with:
|
with:
|
||||||
source-tag: ${{ env.TAG_NAME }}
|
source-tag: ${{ env.TAG_NAME }}
|
||||||
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
|
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
|
||||||
|
|||||||
@@ -5,7 +5,12 @@ on:
|
|||||||
- cron: '0 3 * * 0'
|
- cron: '0 3 * * 0'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
call-update-configuration-files:
|
call-update-configuration-files:
|
||||||
name: Update configuration files
|
name: Update configuration files
|
||||||
|
permissions:
|
||||||
|
contents: write # to push the branch with updated configuration files
|
||||||
|
pull-requests: write # to open/update the configuration update PR
|
||||||
uses: actions/reusable-workflows/.github/workflows/update-config-files.yml@main
|
uses: actions/reusable-workflows/.github/workflows/update-config-files.yml@main
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
name: Security analysis with zizmor
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- releases/*
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
pull_request:
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
zizmor:
|
||||||
|
name: Analyze workflows with zizmor
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
security-events: write # to upload SARIF results to code scanning
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v7
|
||||||
|
with:
|
||||||
|
python-version: '3.x'
|
||||||
|
|
||||||
|
- name: Install zizmor
|
||||||
|
run: pip install zizmor
|
||||||
|
|
||||||
|
- name: Run zizmor
|
||||||
|
run: zizmor --format sarif .github/workflows/ > zizmor.sarif
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Upload SARIF results to code scanning
|
||||||
|
if: always() && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
|
||||||
|
uses: github/codeql-action/upload-sarif@v4
|
||||||
|
with:
|
||||||
|
sarif_file: zizmor.sarif
|
||||||
|
category: zizmor
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# Configuration for zizmor (https://docs.zizmor.sh)
|
||||||
|
rules:
|
||||||
|
unpinned-uses:
|
||||||
|
config:
|
||||||
|
# First-party GitHub-maintained actions are trusted and referenced by
|
||||||
|
# major-version tags (the convention used across the actions org).
|
||||||
|
# Any third-party action must be pinned to a full commit SHA.
|
||||||
|
policies:
|
||||||
|
actions/*: ref-pin
|
||||||
|
github/*: ref-pin
|
||||||
|
'*': hash-pin
|
||||||
Executable
+1
@@ -0,0 +1 @@
|
|||||||
|
npx lint-staged
|
||||||
Executable
+1
@@ -0,0 +1 @@
|
|||||||
|
npm run build && npm test
|
||||||
@@ -10,6 +10,11 @@ allowed:
|
|||||||
- mit
|
- mit
|
||||||
- cc0-1.0
|
- cc0-1.0
|
||||||
- unlicense
|
- unlicense
|
||||||
|
- blueoak-1.0.0
|
||||||
|
|
||||||
reviewed:
|
reviewed:
|
||||||
npm:
|
npm:
|
||||||
|
- "@actions/http-client" # MIT (license text present), but detected as "other"
|
||||||
|
- "argparse" # Python Software Foundation License (PSF), but detected as "other"
|
||||||
|
- "balanced-match"
|
||||||
|
- "brace-expansion"
|
||||||
|
|||||||
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Binary file not shown.
Generated
BIN
Binary file not shown.
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Binary file not shown.
Generated
BIN
Binary file not shown.
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
@@ -1,11 +0,0 @@
|
|||||||
// This is a reusable configuration file copied from https://github.com/actions/reusable-workflows/tree/main/reusable-configurations. Please don't make changes to this file as it's the subject of an automatic update.
|
|
||||||
module.exports = {
|
|
||||||
printWidth: 80,
|
|
||||||
tabWidth: 2,
|
|
||||||
useTabs: false,
|
|
||||||
semi: true,
|
|
||||||
singleQuote: true,
|
|
||||||
trailingComma: 'none',
|
|
||||||
bracketSpacing: false,
|
|
||||||
arrowParens: 'avoid'
|
|
||||||
};
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user