From 93954a158026816930c113fba908ce4706155991 Mon Sep 17 00:00:00 2001 From: pippocao Date: Thu, 26 Sep 2024 18:24:15 +0800 Subject: [PATCH] CI: add JAVA_HOME to freeBSD --- .github/workflows/build_for_all_platform.yml | 34 +++++++++++++------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build_for_all_platform.yml b/.github/workflows/build_for_all_platform.yml index e2fb36a..91946d4 100644 --- a/.github/workflows/build_for_all_platform.yml +++ b/.github/workflows/build_for_all_platform.yml @@ -182,16 +182,20 @@ jobs: id: RunInFreeBSD uses: vmactions/freebsd-vm@v1 with: + usesh: true + prepare: | + pkg install -y gcc cmake bash openjdk11 + run: | - pwd - ls -lah - whoami - env - freebsd-version - sysctl hw.model - sysctl hw.ncpu - sysctl hw.physmem - sysctl hw.usermem + pkg info -l openjdk11 | grep 'bin/java' + export JAVA_HOME="/usr/local/openjdk11" + export PATH="$JAVA_HOME/bin:$PATH" + echo "JAVA_HOME=$JAVA_HOME" >> $GITHUB_ENV + echo "PATH=$PATH" >> $GITHUB_ENV + cd build/lib/unix_like + chmod +x *.sh + ./GenerateDynamicLib_Clang.sh + ./GenerateStaticLib_Clang.sh build-freebsd-gcc: runs-on: ubuntu-latest @@ -203,14 +207,20 @@ jobs: id: RunInFreeBSD uses: vmactions/freebsd-vm@v1 with: + usesh: true prepare: | - pkg install -y gcc cmake openjdk11 + pkg install -y gcc cmake bash openjdk11 run: | + pkg info -l openjdk11 | grep 'bin/java' + export JAVA_HOME="/usr/local/openjdk11" + export PATH="$JAVA_HOME/bin:$PATH" + echo "JAVA_HOME=$JAVA_HOME" >> $GITHUB_ENV + echo "PATH=$PATH" >> $GITHUB_ENV cd build/lib/unix_like chmod +x *.sh - csh ./GenerateDynamicLib_GCC.sh - csh ./GenerateStaticLib_GCC.sh + ./GenerateDynamicLib_GCC.sh + ./GenerateStaticLib_GCC.sh build-debian-clang: runs-on: ubuntu-latest