- Notifications
You must be signed in to change notification settings - Fork205
Fix string comparison in PChecker runtime#213
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 workflow will use the published PEx Maven package instead of building it locally | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
| name:PEx on Ubuntu | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| inputs: | |
| args: | |
| description:Additional arguments | |
| default:"" | |
| required:false | |
| pex_version: | |
| description:PEx version to use (defaults to latest published version) | |
| required:false | |
| type:string | |
| jobs: | |
| PEx-Setup-And-Test-Ubuntu: | |
| runs-on:ubuntu-latest | |
| steps: | |
| -uses:actions/checkout@v1 | |
| -name:Setup .NET Core | |
| uses:actions/setup-dotnet@v1 | |
| with: | |
| dotnet-version:8.0.x | |
| -name:Set up JDK | |
| uses:actions/setup-java@v1 | |
| with: | |
| java-version:17 | |
| -name:Cache Maven packages | |
| uses:actions/cache@v4 | |
| with: | |
| path:~/.m2 | |
| key:${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
| restore-keys:${{ runner.os }}-m2 | |
| -name:Determine PEx version | |
| id:pex_version | |
| run:| | |
| # Use the version provided in the workflow input, or default to the latest version in pom.xml | |
| if [ -n "${{ github.event.inputs.pex_version }}" ]; then | |
| PEX_VERSION="${{ github.event.inputs.pex_version }}" | |
| else | |
| # Extract the version from the PEx pom.xml | |
| PEX_VERSION=$(grep -oP '<revision>\K[^<]+' Src/PEx/pom.xml) | |
| fi | |
| echo "PEX_VERSION=${PEX_VERSION}" >> $GITHUB_ENV | |
| echo "Using PEx version: ${PEX_VERSION}" | |
| -name:Add PEx Maven dependency | |
| run:| | |
| echo "Using published PEx Maven package (io.github.p-org:pex:${PEX_VERSION}) instead of building locally" | |
| # The P compiler will automatically use the published package from Maven Central | |
| -name:Install P as a tool | |
| run:dotnet tool install --global p | |
| -name:Test with published PEx package | |
| run:| | |
| # Navigate to the ClientServer tutorial | |
| cd Tutorial/1_ClientServer | |
| # Compile the P program | |
| echo "Compiling ClientServer tutorial with published PEx package..." | |
| p compile --mode pex | |
| # Check if compilation was successful | |
| if [ $? -ne 0 ]; then | |
| echo "Error: Failed to compile ClientServer tutorial" | |
| exit 1 | |
| fi | |
| # Run a test case | |
| echo "Running test case with published PEx package..." | |
| p check --mode pex -tc tcSingleClient -t 60 --checker-args :--max-choices-per-schedule:1000000:--max-choices-per-call:100 ||true | |
| # We consider the test successful regardless of the exit code | |
| # because we're just testing that the PEx package can be used | |
| echo "Successfully tested published PEx package (io.github.p-org:pex:${PEX_VERSION})" |