Move Xcode CRuby settings into xcconfig #102
Workflow file for this run
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: Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
macos: | |
name: macOS Xcode Toolchain | |
runs-on: macos-14 | |
strategy: | |
fail-fast: false | |
matrix: | |
xcode: ['15.3'] | |
steps: | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: ${{ matrix.xcode }} | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Ruby | |
run: | | |
gem install rouge | |
ruby --version | |
ruby -e 'puts RbConfig::TOPDIR' | |
ruby -e 'puts RbConfig::CONFIG' | |
gem env | |
- name: CRuby | |
run: | | |
swift package update | |
swift package edit CRuby | |
Packages/CRuby/cfg-cruby --mode custom --path `ruby -e 'puts RbConfig::TOPDIR'` | |
cat Packages/CRuby/CRuby.pc | |
cat Packages/CRuby/Sources/CRuby/module.modulemap | |
cat Packages/CRuby/Sources/CRuby/ruby_headers.h | |
- name: Tests (SPM) | |
run: | | |
export PKG_CONFIG_PATH=$(pwd)/Packages/CRuby:$PKG_CONFIG_PATH | |
swift test --enable-code-coverage | |
- name: Coverage generation | |
run: | | |
xcrun llvm-cov export -format lcov .build/debug/RubyGatewayPackageTests.xctest/Contents/MacOS/RubyGatewayPackageTests -instr-profile .build/debug/codecov/default.profdata -ignore-filename-regex "(Test|checkouts)" > coverage.lcov | |
- name: Coverage upload | |
uses: codecov/codecov-action@v2 | |
with: | |
files: ./coverage.lcov | |
verbose: true | |
- name: Tests (Xcodebuild) | |
run: | | |
CRuby/cfg-cruby --mode custom --path `ruby -e 'puts RbConfig::TOPDIR'` | |
xcodebuild test -scheme RubyGateway-Package | |
linux: | |
name: ubuntu latest | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
rby: | |
- short: '2.7' | |
- short: '3.0' | |
- short: '3.1' | |
- short: '3.2' | |
- short: '3.3' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.rby.short }} | |
- name: Ruby | |
run: | | |
gem install rouge | |
ruby --version | |
which ruby | |
echo "RB_PREFIX=$(ruby -e 'puts RbConfig::TOPDIR')" >> $GITHUB_ENV | |
ruby -e 'puts RbConfig::TOPDIR' | |
ruby -e 'puts RbConfig::CONFIG' | |
gem env | |
ls -l /opt/hostedtoolcache/Ruby | |
- name: CRuby | |
run: | | |
swift package update | |
swift package edit CRuby | |
Packages/CRuby/cfg-cruby --mode custom --path ${RB_PREFIX} | |
cat Packages/CRuby/CRuby.pc | |
cat Packages/CRuby/Sources/CRuby/module.modulemap | |
cat Packages/CRuby/Sources/CRuby/ruby_headers.h | |
- name: Tests | |
run: | | |
export PKG_CONFIG_PATH=$(pwd)/Packages/CRuby:$PKG_CONFIG_PATH | |
export LD_LIBRARY_PATH=${RB_PREFIX}/lib:$LD_LIBRARY_PATH | |
swift test |