-
Notifications
You must be signed in to change notification settings - Fork 7
97 lines (94 loc) · 2.91 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
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