Skip to content

rspec on several ruby versions and also macos #21

rspec on several ruby versions and also macos

rspec on several ruby versions and also macos #21

Workflow file for this run

name: rspecs
on:
workflow_dispatch: {}
push:
branches: [test-workflow]
tags: v*
jobs:
rspec:
runs-on: ubuntu-latest
strategy:
matrix:
# note 20-Jul-2023 2.7.8 is EOL
ruby_version: ['2.7.8', '3.0.6', '3.1.4', '3.2.2']
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
- run: bundle install
# install from ppa for up-to-date version
- name: update ubuntu packages
run: |
sudo apt-get update
# otherwise it prompts for timezone
sudo apt-get install -y tzdata
sudo apt-get install -y software-properties-common
- name: install swi-prolog from ppa
run: |
# Stable versions
sudo apt-add-repository -y ppa:swi-prolog/stable
sudo apt-get update
sudo apt-get install -y swi-prolog-nox
# Development versions
# sudo apt-add-repository ppa:swi-prolog/devel
# sudo apt-get update
# sudo apt-get install -y swi-prolog-nox
- run: rspec
rspec-macos:
runs-on: macos-latest
strategy:
matrix:
# note 20-Jul-2023 2.7.8 is EOL
ruby_version: ['2.7.8', '3.0.6', '3.1.4', '3.2.2']
steps:
- name: install swi-prolog
run: |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install swi-prolog
# for possible future debugging
# otool -L $(which swipl)
# swipl --dump-runtime-variables=sh
# env
# find /usr/local/Cellar/swi-prolog/9.0.4 -ls
# false
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
- run: bundle install
- run: rspec