-
Notifications
You must be signed in to change notification settings - Fork 69
84 lines (72 loc) · 2.35 KB
/
testing.yml
File metadata and controls
84 lines (72 loc) · 2.35 KB
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
name: Rice CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
mkmf:
name: mkmf (${{ matrix.os }}, ${{ matrix.ruby }}, C++17)
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-2025]
ruby: ['3.2', '3.3', '3.4', '4.0']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Configure
run: rake headers
- name: Build and test
run: rake test
- name: Mkmf.log
uses: actions/upload-artifact@v6
if: always()
with:
name: mkmf-${{ matrix.os }}-${{ matrix.version }}-${{ matrix.ruby }}
path: test/mkmf.log
cmake:
name: cmake (${{ matrix.os }}, C++${{ matrix.cpp_standard }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-2025]
cpp_standard: ['17', '20', '23']
include:
- os: ubuntu-latest
preset: linux-debug
ruby: '4.0'
- os: macos-latest
preset: macos-debug
ruby: '4.0'
- os: windows-2025
preset: msvc-debug
ruby: mswin
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libffi-dev
- if: runner.os == 'macOS'
run: brew install libffi
- if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
- if: runner.os == 'Windows'
uses: seanmiddleditch/gha-setup-ninja@v6
- if: runner.os == 'Windows'
shell: pwsh
run: |
git clone https://github.com/microsoft/vcpkg.git "$env:RUNNER_TEMP\vcpkg"
& "$env:RUNNER_TEMP\vcpkg\bootstrap-vcpkg.bat"
echo "VCPKG_ROOT=$env:RUNNER_TEMP\vcpkg" >> $env:GITHUB_ENV
& "$env:RUNNER_TEMP\vcpkg\vcpkg.exe" install libffi:x64-windows
- run: cmake --preset ${{ matrix.preset }} -DCMAKE_CXX_STANDARD=${{ matrix.cpp_standard }}
- run: cmake --build --preset ${{ matrix.preset }}