JACOBIN-881 Elaborated last few details in the notes regarding INVOK… #3752
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: Go build and test | |
| env: | |
| GO111MODULE: "on" | |
| on: | |
| workflow_dispatch: | |
| push: | |
| paths-ignore: | |
| - '**.md' | |
| - '**.py' | |
| - '**.txt' | |
| - '**.yml' | |
| branches: [ "main" ] | |
| pull_request: | |
| paths-ignore: | |
| - '**.md' | |
| - '**.py' | |
| - '**.txt' | |
| - '**.yml' | |
| branches: [ "main" ] | |
| jobs: | |
| build-and-test: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@main | |
| - name: Set up Go | |
| uses: actions/setup-go@main | |
| with: | |
| go-version: '1.26.1' | |
| cache: true | |
| cache-dependency-path: "**/go.sum" | |
| - name: Add Go to PATH | |
| shell: bash | |
| run: echo "$HOME/go/bin" >> $GITHUB_PATH | |
| - name: Setup JDK | |
| uses: actions/setup-java@main | |
| with: | |
| distribution: 'oracle' | |
| java-version: '21' | |
| - name: Build Jacobin | |
| shell: bash | |
| run: | | |
| pwd | |
| cd src | |
| if [[ "$RUNNER_OS" == "Windows" ]]; then | |
| go build -o "$HOME/go/bin/jacobin.exe" . | |
| else | |
| go build -o "$HOME/go/bin/jacobin" . | |
| fi | |
| jacobin -h | |
| which jacobin | |
| - name: go test | |
| shell: bash | |
| run: | | |
| pwd | |
| ls -l $HOME/go/bin | |
| export JACOBIN_TOP=`pwd` | |
| export JACOBIN_TESTDATA=$JACOBIN_TOP/testdata | |
| cd src | |
| export JACOBIN_EXE=$HOME/go/bin/jacobin | |
| if [[ "$RUNNER_OS" == "Windows" ]]; then | |
| export JACOBIN_EXE=$HOME/go/bin/jacobin.exe | |
| else | |
| export JACOBIN_EXE=$HOME/go/bin/jacobin | |
| fi | |
| which jacobin | |
| go test -v -timeout 3m ./... |