Merge pull request #125 from ruby-llvm/dependabot/bundler/rubocop-min… #195
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: Matrix Testing | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }}-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu, macos] | |
ruby: ['2.7', '3.0', '3.1', '3.2'] | |
continue-on-error: ${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'debug' }} | |
steps: | |
- name: Install LLVM on macos | |
if: matrix.os == 'macos' | |
run: | | |
brew install llvm@15 | |
echo "$(brew --prefix llvm@15)/bin" >> $GITHUB_PATH | |
sudo mkdir -pv /opt/local/ | |
sudo ln -sv $(brew --prefix llvm@15)/lib /opt/local/lib | |
# ffi will only look for files in a small set of directories, so llvm needs to be there | |
# https://github.com/ffi/ffi/blob/master/lib/ffi/dynamic_library.rb#L33 | |
# /usr/lib /usr/local/lib /opt/local/lib /opt/homebrew/lib | |
# this uses /opt/local/lib -> /usr/local/opt/llvm/lib | |
- name: 'MacOS debug' | |
if: | |
matrix.os == 'macos' | |
run: | | |
echo $(brew --repository) | |
echo $(brew --prefix llvm@15) | |
echo $(brew info llvm@15) | |
echo "$PATH" | |
echo $(llvm-config --ldflags) | |
ls -l /usr/local/Cellar/llvm@15/15.*/lib/libLLVM.dylib | |
ls -l $(brew --prefix llvm@15)/lib/libLLVM.dylib | |
ls -l /opt/local/lib/libLLVM.dylib | |
- name: Install LLVM on ubuntu | |
if: matrix.os == 'ubuntu' | |
run: | | |
wget https://apt.llvm.org/llvm.sh | |
chmod +x llvm.sh | |
sudo ./llvm.sh 15 | |
- uses: actions/checkout@v3 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
- run: bundle install | |
- run: cd ext/ruby-llvm-support && bundle exec rake | |
name: "Build support library" | |
- run: bundle exec rake | |
name: "Run tests" |