Start attempt at cross platform support. #138
This file contains 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
name: Ruby | ||
on: | ||
push: | ||
branches: [ main ] | ||
paths-ignore: | ||
- '**/*.md' | ||
pull_request: | ||
branches: [ main ] | ||
paths-ignore: | ||
- '**/*.md' | ||
workflow_dispatch: | ||
jobs: | ||
test_xplatform: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
os: | ||
- name: freebsd | ||
architecture: x86-64 | ||
version: '14.0' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Test on ${{ matrix.os.name }} | ||
uses: cross-platform-actions/[email protected] | ||
with: | ||
operating_system: ${{ matrix.os.name }} | ||
architecture: ${{ matrix.os.architecture }} | ||
version: ${{ matrix.os.version }} | ||
shell: bash | ||
memory: 2GB | ||
cpu_count: 2 | ||
run: | | ||
pkg install -i -y ruby | ||
bundle install | ||
test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ruby-version: ['2.6', '2.7', '3.0', '3.1', '3.2', '3.3', 'jruby', 'truffleruby'] | ||
platform: [ubuntu-latest, macos-latest, windows-latest] | ||
exclude: | ||
- ruby-version: truffleruby | ||
platform: windows-latest | ||
- ruby-version: jruby | ||
platform: windows-latest | ||
runs-on: ${{ matrix.platform }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby-version }} | ||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | ||
- name: Run tests | ||
run: bundle exec rake | ||
# test_solaris: | ||
# runs-on: macos-12 | ||
# name: A job to run test in Solaris | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# - name: test Solaris | ||
# id: test | ||
# uses: vmactions/solaris-vm@v0 | ||
# with: | ||
# usesh: true | ||
# prepare: | | ||
# # as far as i know latest possible version ist 2.6.x in Solaris 11.4 | ||
# pkgutil -y -i runtime/ruby-26 | ||
# ruby -v | ||
# gem install bundler | ||
# bundle install | ||
# # | ||
# # maybe use puppet to get new ruby (?) | ||
# # so we would get ruby 2.7.6p219 | ||
# # curl -JLO 'https://pm.puppetlabs.com/puppet-agent/2021.7.1/7.20.0/repos/solaris/11/puppet7/[email protected],5.11-1.i386.p5p' | ||
# # pkg install -g file://$(pwd)/puppet-agent\@7.20.0\,5.11-1.i386.p5p pkg:/puppet-agent | ||
# run: | | ||
# bundle exec rake |