From 48f78d5b2b43bef0dfb1636eb6c48eb763fc5b1b Mon Sep 17 00:00:00 2001 From: lread Date: Sat, 23 Sep 2023 19:11:15 -0400 Subject: [PATCH 1/2] test: bump Graalvm to JDK 21 Setup CIs to run native tests against both Oracle and Community variants. --- .circleci/config.yml | 2 +- .github/workflows/ci.yml | 10 +++++----- script/circle_ci.clj | 4 ++++ test/babashka/process_exec_test.clj | 2 +- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 41ea736..c5471cb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -203,7 +203,7 @@ workflows: 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" From 9ece1a3ca9bfae386983019419870aa4bda14852 Mon Sep 17 00:00:00 2001 From: lread Date: Sat, 23 Sep 2023 19:40:06 -0400 Subject: [PATCH 2/2] circleci: bump windows OS GraalVM needs Visual Studio 2022. This is included with windows-server-2022. --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c5471cb..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,7 +199,7 @@ 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]