Continuous Integration #11
Workflow file for this run
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
| # This work flow runs all Java tests after each commit. | |
| # Since it also has to build the Clingo shared libraries first, it only runs on the natively supported GitHub runners, | |
| # to speed up the process. | |
| name: Continuous Integration | |
| on: [ "push", "workflow_dispatch" ] | |
| env: | |
| CLINGO_RELEASE: "v5.8.0" | |
| jobs: | |
| # don't split these stages to avoid up/downloading any artefacts and immediately start testing after build | |
| build-and-test-unix: | |
| name: Run ${{ matrix.runner }} | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| runner: | |
| - ubuntu-latest | |
| - macos-latest | |
| steps: | |
| - name: Checkout clingo | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: potassco/clingo | |
| submodules: recursive | |
| path: clingo | |
| ref: ${{ env.CLINGO_RELEASE }} | |
| - name: Checkout jclingo | |
| uses: actions/checkout@v4 | |
| with: | |
| path: jclingo | |
| - name: Build clingo | |
| shell: bash | |
| run: | | |
| cd ${{ github.workspace }}/clingo | |
| ../jclingo/.github/build.sh | |
| - name: Move library | |
| run: | | |
| cd ${{ github.workspace }} | |
| mkdir -p jclingo/src/main/resources | |
| mv clingo/build/bin/* jclingo/src/main/resources/ | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'zulu' | |
| java-version: '11' | |
| - name: Run tests | |
| shell: bash | |
| run: cd ${{ github.workspace }}/jclingo && mvn test | |
| build-and-test-windows: | |
| name: Run windows-latest | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout clingo | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: potassco/clingo | |
| submodules: recursive | |
| path: clingo | |
| ref: ${{ env.CLINGO_RELEASE }} | |
| - name: Checkout jclingo | |
| uses: actions/checkout@v4 | |
| with: | |
| path: jclingo | |
| - name: Build clingo | |
| shell: cmd | |
| run: | | |
| cd ${{ github.workspace }}\clingo | |
| ..\jclingo\.github\build.bat | |
| - name: Move library | |
| run: | | |
| cd ${{ github.workspace }} | |
| mkdir jclingo\src\main\resources | |
| move clingo\build\bin\Release\clingo.dll jclingo\src\main\resources | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'zulu' | |
| java-version: '11' | |
| - name: Run tests | |
| shell: cmd | |
| run: cd ${{ github.workspace }}\jclingo && mvn test |