-
Notifications
You must be signed in to change notification settings - Fork 329
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'github-actions' of https://github.com/eregon/ffi into e…
…regon-github-actions
- Loading branch information
Showing
7 changed files
with
50 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: CI | ||
on: [push, pull_request] | ||
jobs: | ||
specs: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ ubuntu, macos, windows ] | ||
ruby: [ 2.3, 2.4, 2.5, 2.6, 2.7, ruby-head, truffleruby-head ] | ||
exclude: | ||
- os: windows | ||
ruby: truffleruby-head | ||
- os: windows | ||
ruby: 2.3 # compilation fails | ||
runs-on: ${{ matrix.os }}-latest | ||
env: | ||
MAKE: "make" # to not try to use gmake on Windows | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
|
||
- run: brew install automake | ||
if: matrix.os == 'macos' | ||
|
||
# Bundler 2 seems to fix installing rubygems-tasks on Ruby < 2.4 | ||
- run: gem install bundler | ||
- run: bundle install | ||
- run: bundle exec rake libffi | ||
- run: bundle exec rake compile | ||
|
||
- run: bundle exec rake test | ||
|
||
- run: bundle exec rake bench:all | ||
if: matrix.ruby != 'truffleruby-head' | ||
env: | ||
ITER: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,4 +50,4 @@ class Timeval < FFI::Struct | |
iter.times { Time.now } | ||
} | ||
} | ||
end | ||
end unless FFI::Platform.windows? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,4 +24,4 @@ module Posix | |
iter.times { Process.uid } | ||
} | ||
} | ||
end | ||
end unless FFI::Platform.windows? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,4 +59,4 @@ def self.umask(mask = nil) | |
ITER.times { NativeFile.umask } | ||
} | ||
} | ||
end | ||
end unless FFI::Platform.windows? |