Skip to content

Commit

Permalink
test: bump Graalvm to JDK 21 (#145)
Browse files Browse the repository at this point in the history
* test: bump Graalvm to JDK 21

Setup CIs to run native tests against both Oracle and Community variants.

* circleci: bump windows OS

GraalVM needs Visual Studio 2022.
This is included with windows-server-2022.
  • Loading branch information
lread authored Sep 24, 2023
1 parent d24961a commit 7b25a68
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ executors:
working_directory: ~/repo
windows:
machine:
image: windows-server-2019-vs2019:stable
image: windows-server-2022-gui:current
resource_class: windows.medium
shell: powershell.exe -ExecutionPolicy Bypass
working_directory: ~/repo
Expand Down Expand Up @@ -199,11 +199,11 @@ workflows:
os: [linux, macos, windows]
jdk: ['temurin@8','temurin@11','temurin@17']
- test-native:
name: test-<< matrix.os >>-native
name: test-<< matrix.os >>-<< matrix.jdk>>
matrix:
parameters:
os: [linux, macos, windows]
jdk: ['graalvm_ce19']
jdk: ['graalvm@21', 'graalvm_community@21']
- deploy:
filters:
branches:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu, macOS, windows]
distribution: [graalvm, graalvm-community]

runs-on: ${{ matrix.os }}-latest
name: test-${{ matrix.os }}-native
name: test-${{ matrix.os }}-${{ matrix.distribution}}-native

steps:
- name: "Checkout code"
Expand All @@ -66,10 +67,9 @@ jobs:
- name: Install GraalVM
uses: graalvm/setup-graalvm@v1
with:
# match version babashka uses
version: '22.3.1'
java-version: 19
components: 'native-image'
# match version babashka uses (or will soon use)
java-version: '21'
distribution: ${{ matrix.distribution }}
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: "Restore Cache"
Expand Down
4 changes: 4 additions & 0 deletions script/circle_ci.clj
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,16 @@
(set-jdk-env os install-dir)))

(comment

(install-jdk "macos" "temurin@11")
(install-jdk "windows" "temurin@17")
(install-jdk "linux" "temurin@11")
(install-jdk "linux" "graalvm_ce19")
(install-jdk "windows" "graalvm_ce19")

(install-jdk "linux" "graalvm@21" )
(install-jdk "linux" "graalvm_community@21" )

(install-jdk "linux" "temurin@8")

(parse-jdk "graalvm_ce19")
Expand Down
2 changes: 1 addition & 1 deletion test/babashka/process_exec_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
(let [expected (shell/sh "java" "-version")]
(is (zero? (:exit expected)) "sanity expected exit")
(is (str/blank? (:out expected)) "sanity expected out" )
(is (re-find #"(?i)jdk" (:err expected)) "sanity expected err")
(is (re-find #"(?i)(jdk|java)" (:err expected)) "sanity expected err")
(testing "on-path"
(is (= expected (run-exec "java -version"))))
(testing "absolute"
Expand Down

0 comments on commit 7b25a68

Please sign in to comment.