From 7b25a686121b2732072c63881402cc42adb8f976 Mon Sep 17 00:00:00 2001 From: Lee Read Date: Sun, 24 Sep 2023 03:43:07 -0400 Subject: [PATCH] test: bump Graalvm to JDK 21 (#145) * 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. --- .circleci/config.yml | 6 +++--- .github/workflows/ci.yml | 10 +++++----- script/circle_ci.clj | 4 ++++ test/babashka/process_exec_test.clj | 2 +- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 41ea736..08c80cc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 @@ -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: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 937aaed..3eaab8f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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" @@ -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" diff --git a/script/circle_ci.clj b/script/circle_ci.clj index f1a8548..93acb72 100644 --- a/script/circle_ci.clj +++ b/script/circle_ci.clj @@ -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") diff --git a/test/babashka/process_exec_test.clj b/test/babashka/process_exec_test.clj index 9e37654..18d8a3f 100644 --- a/test/babashka/process_exec_test.clj +++ b/test/babashka/process_exec_test.clj @@ -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"