[ci] further debug JAVA_HOME on windows #164
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: JSONLab CI | |
| on: [push, pull_request] | |
| jobs: | |
| octave_test: | |
| name: Octave tests | |
| strategy: | |
| # provided octave versions: ubuntu-22.04 = 6.4, ubuntu-24.04 = 8.4, macos-15-intel = 10.3, windows-2022 = 9.4 | |
| matrix: | |
| os: [ubuntu-22.04, ubuntu-24.04, macos-15-intel, windows-2022] | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v3 | |
| with: | |
| submodules: 'recursive' | |
| - name: Install dependencies | |
| run: | | |
| [[ "$RUNNER_OS" == "Linux" ]] && sudo apt-get update && sudo apt-get install -y octave | |
| if [[ "$RUNNER_OS" == "macOS" ]]; then | |
| brew install octave | |
| fi | |
| if [[ "$RUNNER_OS" == "Windows" ]]; then | |
| curl --retry 3 -kL http://cdimage.debian.org/mirror/gnu.org/gnu/octave/windows/octave-9.4.0-w64-64.7z --output octave_9.4.0.7z | |
| 7z x octave_9.4.0.7z -ooctave -y | |
| echo "$PWD/octave/octave-9.4.0-w64-64/mingw64/bin" >> $GITHUB_PATH | |
| echo "JAVA_HOME=$JAVA_HOME_11_X64" >> $GITHUB_ENV | |
| echo "$JAVA_HOME_11_X64/bin/server" >> $GITHUB_PATH | |
| echo "$JAVA_HOME_11_X64/bin" >> $GITHUB_PATH | |
| fi | |
| - name: Run octave test | |
| run: | | |
| env | grep JAVA | |
| octave-cli --eval "disp('--- pkg list ---');pkg list;disp('--- version ---');disp(version);disp('--- JAVA_HOME env ---');disp(getenv('JAVA_HOME'));disp('--- usejava ---');disp(usejava('jvm'));disp(usejava('desktop'));" | |
| octave-cli --version | |
| octave-cli --eval "disp(usejava('jvm'));addpath(pwd);cd test;run_jsonlab_test" | |
| octave-cli --eval "addpath(pwd);cd examples; demo_jsonlab_basic; jsonlab_selftest" | |
| matlab_test: | |
| name: MATLAB test | |
| strategy: | |
| matrix: | |
| os: [ubuntu-22.04, macos-15-intel, macos-14, windows-2022] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v3 | |
| with: | |
| submodules: 'recursive' | |
| - name: Set up MATLAB | |
| uses: matlab-actions/setup-matlab@v2 | |
| with: | |
| release: R2022a | |
| - name: Run MATLAB test | |
| uses: matlab-actions/run-command@v2 | |
| with: | |
| command: addpath(pwd);cd test;run_jsonlab_test | |
| - name: Run MATLAB examples | |
| uses: matlab-actions/run-command@v2 | |
| with: | |
| command: addpath(pwd);cd examples; demo_jsonlab_basic; jsonlab_selftest |