Skip to content

ci: add workflow for building API documentation #233

ci: add workflow for building API documentation

ci: add workflow for building API documentation #233

Workflow file for this run

name: build
on:
push:
branches:
- main
- dev*
- v[0-9]+.[0-9]+.[0-9]+
tags:
- v[0-9]+.[0-9]+.[0-9]+
pull_request:
types: [opened, reopened, synchronize]
jobs:
build:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }}
strategy:
fail-fast: false
matrix:
ruby: [ '3.2', '3.3', '3.4', '4.0' ]
steps:
- uses: actions/checkout@v6
- name: Install BLAS and LAPACK
run: sudo apt-get install -y libopenblas-dev liblapacke-dev
- name: Set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Build and test
run: bash rumale-test.sh
build-win:
runs-on: windows-latest
name: Ruby 3.4 (Windows)
steps:
- uses: actions/checkout@v6
- name: Set up Ruby 3.4
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.4
- name: Install OpenBLAS and LAPACK
run: |
pacman -Syu
pacman -S --noconfirm mingw-w64-ucrt-x86_64-openblas mingw-w64-ucrt-x86_64-lapack
- name: Install numo-narray for red-datasets-numo-narray
run: |
gem install specific_install
gem specific_install -l "https://github.com/ruby-numo/numo-narray.git"
- name: Setting Ruby version to envrionment variable
run: |
$value = ruby -e 'puts RUBY_VERSION'
echo "RUBY_VER=$value" >> $env:GITHUB_ENV
- name: Build and test
run: |
bundle config set --global build.numo-linalg-alt "--with-opt-lib=C:\hostedtoolcache\windows\Ruby\${{ env.RUBY_VER }}\x64\msys64\ucrt64\lib --with-opt-include=C:\hostedtoolcache\windows\Ruby\${{ env.RUBY_VER }}\x64\msys64\ucrt64\include\openblas"
bash rumale-test.sh
build-mac:
runs-on: macos-latest
name: Ruby 3.4 (macOS)
steps:
- uses: actions/checkout@v6
- name: Install OpenBLAS
run: |
brew update
brew install openblas
brew info openblas
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.4
- name: Build and test
run: |
bundle config --global build.numo-linalg-alt "--with-opt-dir=/opt/homebrew/opt/openblas"
bash rumale-test.sh
build-rhel:
runs-on: ubuntu-latest
name: Ruby 3.3 (Rocky)
container: rockylinux/rockylinux:9
steps:
- uses: actions/checkout@v6
- name: Set up Ruby
run: |
dnf update -y
dnf install -y dnf-plugins-core
dnf config-manager --set-enabled crb
dnf module -y enable ruby:3.3
dnf install -y gcc gcc-g++ make git libyaml-devel ruby-devel ruby openblas-devel
bundle config silence_root_warning true
- name: Build and test
run: |
bundle config --global build.numo-linalg-alt "--with-opt-include=/usr/include/openblas"
bash rumale-test.sh