-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (39 loc) · 1.39 KB
/
linux-test.yaml
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
name: Testing on Ubuntu
on: [push, pull_request]
jobs:
test:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
ruby-version: ['3.3', '3.2', '3.1', '3.0', '2.7']
os: [ubuntu-latest]
experimental: [false]
include:
- ruby-version: head
os: ubuntu-latest
experimental: true
# FIXME: on GitHub action, when cpufreq is not available by default
# capability: [true, false]
capability: [false]
name: Ruby ${{ matrix.ruby-version }} capability ${{ matrix.capability }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Set up Ruby
uses: ruby/setup-ruby@7d3497fd78c07c0d84ebafa58d8dac60cd1f0763 # v1.199.0
with:
ruby-version: ${{ matrix.ruby-version }}
- name: Install dependencies
run: |
sudo apt update
sudo apt -V install libcap-ng-dev
gem install bundler -v 2.2.27
bundle _2.2.27_ install
- name: setup linux capability (cap_dac_read_search=+eip)
run: sudo setcap cap_dac_read_search=+eip $(command -v ruby)
if: ${{ matrix.capability }}
- name: show linux capability
run: sudo getcap $(command -v ruby)
- name: Run tests
run: bundle exec rake test