Skip to content

Commit

Permalink
rework jdk toolchain 17 & 21 (#3392)
Browse files Browse the repository at this point in the history
* rework jdk toolchain

* rework CI

* rework CI

* rework CI
  • Loading branch information
c8ef authored Mar 2, 2024
1 parent 70c7ac2 commit 2278b07
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macOS-latest]
arch: [x86_64, arm64]
os: [macos-14]
arch: [arm64]
kind: [static, shared]

runs-on: ${{ matrix.os }}
Expand All @@ -31,4 +31,3 @@ jobs:
wget https://curl.haxx.se/ca/cacert.pem -O /tmp/cacert.pem
export CURL_CA_BUNDLE=/tmp/cacert.pem
xmake l ./scripts/test.lua -D -a ${{ matrix.arch }} -k ${{ matrix.kind }}
33 changes: 33 additions & 0 deletions .github/workflows/macos_x64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: macOS

on:
pull_request:
branches:
- dev

jobs:
build:
strategy:
fail-fast: false
matrix:
os: [macos-12]
arch: [x86_64]
kind: [static, shared]

runs-on: ${{ matrix.os }}

concurrency:
group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-macOS-${{ matrix.arch }}-${{ matrix.kind }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v1
- uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: branch@master
actions-cache-folder: '.xmake-cache'

- name: Tests
run: |
wget https://curl.haxx.se/ca/cacert.pem -O /tmp/cacert.pem
export CURL_CA_BUNDLE=/tmp/cacert.pem
xmake l ./scripts/test.lua -D -a ${{ matrix.arch }} -k ${{ matrix.kind }}
25 changes: 15 additions & 10 deletions packages/o/openjdk/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,28 @@ package("openjdk")
set_license("GPL-2.0")

if is_host("windows", "mingw") then
add_urls("https://download.java.net/java/GA/jdk$(version)/6e380f22cbe7469fa75fb448bd903d8e/9/GPL/openjdk-$(version)_windows-x64_bin.zip")
add_versions("20.0.2", "7e5870fd2e19b87cbd1981c4ff7203897384c2eb104977f40ce4951b40ab433e")
add_urls("https://download.oracle.com/java/$(version)/latest/jdk-$(version)_windows-x64_bin.zip")
add_versions("17", "c98d85c8417703b0f72ddc5757ed66f3478ea7107b0e6d2a98cadbc73a45d77b")
add_versions("21", "776afe55020560f175d8099710d8ac07c4d40772c694385c3dd765117cbd0ac3")
elseif is_host("linux") then
if is_arch("x86_64") then
add_urls("https://download.java.net/java/GA/jdk$(version)/6e380f22cbe7469fa75fb448bd903d8e/9/GPL/openjdk-$(version)_linux-x64_bin.tar.gz")
add_versions("20.0.2", "beaf61959c2953310595e1162b0c626aef33d58628771033ff2936609661956c")
add_urls("https://download.oracle.com/java/$(version)/latest/jdk-$(version)_linux-x64_bin.tar.gz")
add_versions("17", "e4fb2df9a32a876afb0a6e17f54c594c2780e18badfa2e8fc99bc2656b0a57b1")
add_versions("21", "9f1f4a7f25ef6a73255657c40a6d7714f2d269cf15fb2ff1dc9c0c8b56623a6f")
elseif is_arch("arm64") then
add_urls("https://download.java.net/java/GA/jdk$(version)/6e380f22cbe7469fa75fb448bd903d8e/9/GPL/openjdk-$(version)_linux-aarch64_bin.tar.gz")
add_versions("20.0.2", "3238c93267c663dbca00f5d5b0e3fbba40e1eea2b4281612f40542d208b6dd9a")
add_urls("https://download.oracle.com/java/$(version)/latest/jdk-$(version)_linux-aarch64_bin.tar.gz")
add_versions("17", "745e7a387e059ddc2481ccd209d691ca926fc0f35d523051822f24b296d17df7")
add_versions("21", "14504bcdea0d8bc3fe9f065924e9e2dc631317b023a722565c8239075f39062d")
end
elseif is_host("macosx") then
if is_arch("x86_64") then
add_urls("https://download.java.net/java/GA/jdk$(version)/6e380f22cbe7469fa75fb448bd903d8e/9/GPL/openjdk-$(version)_macos-x64_bin.tar.gz")
add_versions("20.0.2", "c65ba92b73d8076e2a10029a0674d40ce45c3e0183a8063dd51281e92c9f43fc")
add_urls("https://download.oracle.com/java/$(version)/latest/jdk-$(version)_macos-x64_bin.tar.gz")
add_versions("17", "7b68b833f392aa543ba538f94c60fd477581fef96a9c1ae059fa4158e9ce75ff")
add_versions("21", "197a923b1f7ea2b224fafdfb9c3ef5fc8eb197d9817d7631d96da02b619f5975")
elseif is_arch("arm64") then
add_urls("https://download.java.net/java/GA/jdk$(version)/6e380f22cbe7469fa75fb448bd903d8e/9/GPL/openjdk-$(version)_macos-x64_bin.tar.gz")
add_versions("20.0.2", "2e6522bb574f76cd3f81156acd59115a014bf452bbe4107f0d31ff9b41b3da57")
add_urls("https://download.oracle.com/java/$(version)/latest/jdk-$(version)_macos-aarch64_bin.tar.gz")
add_versions("17", "d5bec93922815e9337040678ddf3f40e50b63c2b588cf63574fa1f2010206042")
add_versions("21", "4b94951f03efe44cb6656e43f1098db3ce254a00412f9d22dff18a8328a7efdd")
end
end

Expand Down

0 comments on commit 2278b07

Please sign in to comment.