mirror of
https://github.com/actions/setup-java
synced 2026-09-26 15:41:44 +02:00
Support Temurin on Linux RISC-V (#1269)
* Document Temurin RISC-V compatibility Co-Authored-By: multicode <multicode@yawk.at> * Expose RISC-V as a canonical architecture Co-Authored-By: multicode <multicode@yawk.at> * Support Temurin on Linux RISC-V Co-Authored-By: multicode <multicode@yawk.at> * Address RISC-V review feedback Co-Authored-By: multicode <multicode@yawk.at> * Fix casing for RISC-V architecture in tests Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Update __tests__/java-platform-contract.test.ts --------- Co-authored-by: multicode <multicode@yawk.at> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
co-authored by
multicode
Copilot Autofix powered by AI
parent
1aa87b638d
commit
97c5a5e13a
@@ -293,7 +293,8 @@ describe('getAvailableVersions', () => {
|
||||
it.each([
|
||||
['amd64', 'x64'],
|
||||
['arm', 'arm'],
|
||||
['arm64', 'aarch64']
|
||||
['arm64', 'aarch64'],
|
||||
['riscv64', 'riscv64']
|
||||
])(
|
||||
'defaults to os.arch(): %s mapped to distro arch: %s',
|
||||
async (osArch: string, distroArch: string) => {
|
||||
|
||||
@@ -25,6 +25,7 @@ describe('Java platform capabilities', () => {
|
||||
['aarch64', 'aarch64'],
|
||||
['arm64', 'aarch64'],
|
||||
['ppc64le', 'ppc64le'],
|
||||
['RiScV64', 'riscv64'],
|
||||
['s390x', 's390x']
|
||||
])('normalizes architecture %s to %s', (input, expected) => {
|
||||
expect(normalizeArchitecture(input)).toBe(expected);
|
||||
@@ -68,6 +69,12 @@ describe('Java platform capabilities', () => {
|
||||
);
|
||||
});
|
||||
|
||||
it('allows Temurin on Linux riscv64', () => {
|
||||
expect(validateJavaPlatform('temurin', 'linux', 'riscv64', '25')).toBe(
|
||||
'riscv64'
|
||||
);
|
||||
});
|
||||
|
||||
it('rejects OS-specific restrictions with a consistent diagnostic', () => {
|
||||
expect(() =>
|
||||
validateJavaPlatform('oracle', 'win32', 'arm64', '21')
|
||||
@@ -115,6 +122,7 @@ describe('Java platform capabilities', () => {
|
||||
'aarch64',
|
||||
'ppc64le',
|
||||
'ppc64',
|
||||
'riscv64',
|
||||
's390x'
|
||||
]) {
|
||||
expect(content).toContain(architecture);
|
||||
|
||||
Reference in New Issue
Block a user