forked from eventmachine/eventmachine
-
Notifications
You must be signed in to change notification settings - Fork 0
116 lines (98 loc) · 3.49 KB
/
workflow.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: CI
on: [ push, pull_request, workflow_dispatch ]
jobs:
build:
name: >-
${{ matrix.os }} ${{ matrix.ruby }}
runs-on: ${{ matrix.os }}
timeout-minutes: ${{ (startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'windows')) && 15 || 10 }}
env:
BUNDLE_WITHOUT: documentation
strategy:
fail-fast: false
matrix:
os:
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-24.04
- macos-13 # amd64
- macos-14 # arm64
- windows-2022
# We currently support four EOL versions of ruby, but only on linux
# versions that were released before that version of ruby went EOL.
ruby: [ '2.5', '2.6', '2.7', '3.0', '3.1', '3.2', '3.3', head ]
include:
- { os: windows-2022, ruby: ucrt } # used instead of "head"
exclude:
- { os: windows-2022, ruby: head } # uses "ucrt" instead
# Ubuntu 20.04 was released just prior to ruby 2.4's EOL
# (no exclusions)
# Ubuntu 22.04 was released just prior to ruby 2.6's EOL
- { os: ubuntu-22.04, ruby: '2.5' }
# Ubuntu 24.04 was released just prior to ruby 3.0's EOL
- { os: ubuntu-24.04, ruby: '2.5' }
- { os: ubuntu-24.04, ruby: '2.6' }
- { os: ubuntu-24.04, ruby: '2.7' }
# No EOL versions for macos-13
- { os: macos-13, ruby: '2.5' }
- { os: macos-13, ruby: '2.6' }
- { os: macos-13, ruby: '2.7' }
- { os: macos-13, ruby: '3.0' }
# No EOL versions for macos-14
- { os: macos-14, ruby: '2.5' }
- { os: macos-14, ruby: '2.6' }
- { os: macos-14, ruby: '2.7' }
- { os: macos-14, ruby: '3.0' }
# No EOL versions for windows-2022
- { os: windows-2022, ruby: '2.5' }
- { os: windows-2022, ruby: '2.6' }
- { os: windows-2022, ruby: '2.7' }
- { os: windows-2022, ruby: '3.0' }
steps:
- name: repo checkout
uses: actions/checkout@v4
- name: load ruby, run bundle install
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
rubygems: ${{ (matrix.ruby < '2.7') && 'latest' || 'default' }}
- name: macOS disable firewall
if: startsWith(matrix.os, 'macos')
run: |
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate off
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate
- name: compile
run: bundle exec rake compile
- name: test
run: bundle exec rake test
env:
CI: true
TESTOPTS: -v --no-show-detail-immediately
pure_ruby:
name: >-
pure ruby (${{ matrix.os }} ${{ matrix.ruby }})
runs-on: ${{ matrix.os }}
timeout-minutes: 10
env:
BUNDLE_WITHOUT: documentation
strategy:
fail-fast: false
matrix:
# TODO: Fix macos-13, macos-14, windows-2022
os: [ ubuntu-20.04, ubuntu-22.04, ubuntu-24.04 ]
ruby: [ '3.1', '3.2', '3.3', head ]
steps:
- name: repo checkout
uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: test_em_pure_ruby
run: bundle exec rake test_em_pure_ruby
env:
CI: true
EM_PURE_RUBY: true
TESTOPTS: -v --no-show-detail-immediately