Skip to content

Swipl API updates 9.1.19 #446

Swipl API updates 9.1.19

Swipl API updates 9.1.19 #446

Workflow file for this run

name: Build and test
on:
push:
pull_request:
defaults:
run:
shell: bash
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
jobs:
is_duplicate_run:
name: Duplicate run?
runs-on: ubuntu-latest
outputs:
duplicate_run: ${{ steps.check_skip.outputs.should_skip }}
steps:
- uses: fkirc/skip-duplicate-actions@master
id: check_skip
with:
# Skip a concurrent run triggered by a pull_request event if there is
# already a run triggered by a push event.
concurrent_skipping: same_content_newer
# Cancel runs from outdated commits.
cancel_others: 'true'
# Do not skip push events. They are used by the push_docker job.
do_not_skip: '["push", "workflow_dispatch", "schedule"]'
clippy:
needs:
- is_duplicate_run
if: |
needs.is_duplicate_run.outputs.duplicate_run == 'false'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: sudo apt update && sudo apt install software-properties-common -y
- run: sudo apt-add-repository ppa:swi-prolog/stable -y && sudo apt update && sudo apt install swi-prolog-nox
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features -- -Dwarnings
build:
needs:
- is_duplicate_run
if: |
needs.is_duplicate_run.outputs.duplicate_run == 'false'
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
dmg: [no_dmg]
#include:
# - os: macos-latest
# dmg: dmg
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Install SWI Prolog on Linux
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt-add-repository ppa:swi-prolog/stable
sudo apt-get update
sudo apt install swi-prolog-nox
- name: Install LLVM and SWI Prolog on Windows
if: ${{ matrix.os == 'windows-latest' }}
run: choco install llvm swi-prolog
- name: Install SWI Prolog on MacOS from brew
if: ${{ matrix.os == 'macos-latest' && matrix.dmg == 'no_dmg' }}
run: brew install swi-prolog
- name: Install SWI Prolog on MacOS from dmg
if: ${{ matrix.os == 'macos-latest' && matrix.dmg == 'dmg' }}
run: bash .ci/install_swipl_dmg.sh
- name: Print information with swipl-info on posix
if: ${{ matrix.os != 'windows-latest' && matrix.dmg == 'no_dmg' }}
run: cargo run --bin print_swipl_info
- name: Print information with swipl-info on windows
if: ${{ matrix.os == 'windows-latest' }}
env:
SWIPL: C:\Program Files\swipl\bin\swipl.exe
run: cargo run --bin print_swipl_info
- name: Print information with swipl-info on osx with dmg
if: ${{ matrix.dmg == 'dmg' }}
env:
SWIPL: /Applications/SWI-Prolog.app/Contents/MacOS/swipl
run: cargo run --bin print_swipl_info
- name: Install cargo-swipl
run: cargo install --path ./cargo-swipl
- name: Run tests on posix
if: ${{ matrix.os != 'windows-latest' && matrix.dmg == 'no_dmg' }}
run: cargo swipl test --all-features
- name: Run tests on windows
if: ${{ matrix.os == 'windows-latest' }}
env:
SWIPL: C:\Program Files\swipl\bin\swipl.exe
LIBCLANG_PATH: C:\Program Files\LLVM\bin\
run: cargo swipl test --all-features
- name: Run tests on osx with dmg
if: ${{ matrix.dmg == 'dmg' }}
env:
SWIPL: /Applications/SWI-Prolog.app/Contents/MacOS/swipl
run: cargo swipl test --all-features