diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 9875de2069..916717364f 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -129,6 +129,11 @@ jobs:
       - uses: actions/checkout@v3
         with:
           submodules: recursive
+      - name: set up JDK 17
+        uses: actions/setup-java@v3
+        with:
+          java-version: '17'
+          distribution: 'adopt'
       - name: Set up cache
         uses: actions/cache@v3
         with: