From ebf8091dbac4bd11a508479a16c172fcf9990ddb Mon Sep 17 00:00:00 2001 From: infogulch Date: Sun, 2 Apr 2023 14:47:52 -0500 Subject: [PATCH 1/3] Test workflow cleanup; switch to macos-11 --- .github/workflows/test.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index aeffd7e9..4767f7b3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,7 @@ jobs: matrix: include: - { os: windows-latest, rust-version: stable, shell: 'msys2 {0}' } - - { os: macos-10.15, rust-version: stable, shell: bash } + - { os: macos-11, rust-version: stable, shell: bash } - { os: ubuntu-20.04, rust-version: stable, shell: bash } - { os: ubuntu-20.04, rust-version: 1.63, shell: bash } - { os: ubuntu-20.04, rust-version: beta, shell: bash } @@ -16,9 +16,6 @@ jobs: defaults: run: shell: ${{ matrix.shell }} - outputs: - os: ${{ matrix.os }} - rust-version: ${{ matrix.rust-version }} steps: - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@master @@ -56,7 +53,7 @@ jobs: run: cargo fmt --check || echo "::warning ::cargo fmt found some formatting changes that may improve readability" - name: Check clippy if: startsWith(matrix.os,'ubuntu') && matrix.rust-version == 'stable' - run: cargo clippy || echo "::warning ::cargo clippy found some code style changes that may be more idiomatic" + run: cargo clippy --no-deps || echo "::warning ::cargo clippy found some code style changes that may be more idiomatic" # On stable rust builds, build a binary and publish as a github actions # artifact. These binaries could be useful for testing the pipeline but From 9de8456c7fda15f527164460bd3bb32d0e74ebd2 Mon Sep 17 00:00:00 2001 From: infogulch Date: Sun, 2 Apr 2023 15:47:02 -0500 Subject: [PATCH 2/3] Add logtalk test suite --- .github/workflows/test.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4767f7b3..2bdfe64d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -47,7 +47,7 @@ jobs: - name: Test run: cargo test --verbose --all - # Only run formatting & style check on one job to not spam warnings. + # Run code formatting and style checks on one job to not spam warnings. - name: Check formatting if: startsWith(matrix.os,'ubuntu') && matrix.rust-version == 'stable' run: cargo fmt --check || echo "::warning ::cargo fmt found some formatting changes that may improve readability" @@ -61,10 +61,26 @@ jobs: # TODO: Check that they actually work. - name: Build release binary if: matrix.rust-version == 'stable' - run: cargo rustc --verbose --bin scryer-prolog --release -- -D warnings + run: | + cargo rustc --verbose --bin scryer-prolog --release -- -D warnings + echo "$PWD/target/release" >> $GITHUB_PATH - name: Publish artifact if: matrix.rust-version == 'stable' uses: actions/upload-artifact@v3 with: path: target/release/scryer-prolog* name: scryer-prolog_${{ matrix.os }} + + # Run iso compliance tests. + - name: Install Logtalk + if: startsWith(matrix.os,'ubuntu') && matrix.rust-version == 'stable' + uses: logtalk-actions/setup-logtalk@master + with: + logtalk-version: git + logtalk-tool-dependencies: false + - name: Run compliance test suite + if: startsWith(matrix.os,'ubuntu') && matrix.rust-version == 'stable' + working-directory: /home/runner/logtalk/tests/prolog + run: | + scryer-prolog -v + logtalk_tester -p scryer -g "set_logtalk_flag(clean,off)" -w -t 360 From a197bb68154fc19b9d895661d6700cd75cd981bb Mon Sep 17 00:00:00 2001 From: infogulch Date: Thu, 6 Apr 2023 09:40:03 -0500 Subject: [PATCH 3/3] Allow the test suite to fail without failing the build --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2bdfe64d..1f883ec7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -80,6 +80,7 @@ jobs: logtalk-tool-dependencies: false - name: Run compliance test suite if: startsWith(matrix.os,'ubuntu') && matrix.rust-version == 'stable' + continue-on-error: true working-directory: /home/runner/logtalk/tests/prolog run: | scryer-prolog -v