-
Notifications
You must be signed in to change notification settings - Fork 0
131 lines (115 loc) · 3.38 KB
/
ci.yml
File metadata and controls
131 lines (115 loc) · 3.38 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
name: test (${{ matrix.os }}, ruby ${{ matrix.ruby }}, ${{ matrix.toolchain }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# Linux
- os: ubuntu-latest
ruby: '3.1'
preset: linux-release
toolchain: system
- os: ubuntu-latest
ruby: '3.2'
preset: linux-release
toolchain: system
- os: ubuntu-latest
ruby: '3.3'
preset: linux-release
toolchain: system
- os: ubuntu-latest
ruby: '3.4'
preset: linux-release
toolchain: system
# macOS
- os: macos-latest
ruby: '3.2'
preset: macos-release
toolchain: system
- os: macos-latest
ruby: '3.3'
preset: macos-release
toolchain: system
- os: macos-latest
ruby: '3.4'
preset: macos-release
toolchain: system
# Windows (MinGW)
- os: windows-2025
ruby: '3.2'
preset: mingw-release
toolchain: mingw
- os: windows-2025
ruby: '3.3'
preset: mingw-release
toolchain: mingw
- os: windows-2025
ruby: '3.4'
preset: mingw-release
toolchain: mingw
steps:
- uses: actions/checkout@v4
# Ruby
- name: Set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
# Toolchains / Ninja
- name: Install Ninja (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y ninja-build
- name: Install Ninja (macOS)
if: runner.os == 'macOS'
run: brew install ninja
# MinGW: MSYS2 with gcc + ninja + cmake
- name: Setup MSYS2 (MinGW)
if: runner.os == 'Windows' && matrix.toolchain == 'mingw'
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: >-
mingw-w64-x86_64-gcc
mingw-w64-x86_64-cmake
mingw-w64-x86_64-ninja
# Configure + Build
- name: Configure CMake (Linux/macOS)
if: runner.os != 'Windows'
run: cmake --preset ${{ matrix.preset }}
- name: Build (Linux/macOS)
if: runner.os != 'Windows'
run: cmake --build --preset ${{ matrix.preset }}
- name: Configure CMake (Windows MinGW)
if: runner.os == 'Windows' && matrix.toolchain == 'mingw'
shell: msys2 {0}
run: cmake --preset ${{ matrix.preset }}
- name: Build (Windows MinGW)
if: runner.os == 'Windows' && matrix.toolchain == 'mingw'
shell: msys2 {0}
run: cmake --build --preset ${{ matrix.preset }}
# Tests
- name: Install dependencies
run: bundle install
- name: Run tests
run: bundle exec rake test
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
- name: Check gemspec
run: gem build bitmap_plus_plus.gemspec --strict