-
-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
36f34fe
commit b0f5c03
Showing
48 changed files
with
2,190 additions
and
456 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,5 @@ | ||
3.1.0:x86_64-linux | ||
3.1.0:aarch64-linux | ||
3.1.0:x86_64-darwin | ||
3.1.0:arm64-darwin | ||
3.1.0:x64-mingw-ucrt |
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,148 @@ | ||
name: Test cruby build and installation | ||
concurrency: | ||
group: "${{github.workflow}}-${{github.ref}}" | ||
cancel-in-progress: true | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
cruby-package: | ||
name: Compile native gem | ||
runs-on: ubuntu-latest | ||
strategy: | ||
# fail-fast: false | ||
matrix: | ||
platform: | ||
- x86_64-linux | ||
- aarch64-linux | ||
|
||
- x86_64-darwin | ||
# github actions does not support this runner, which is why it's | ||
# missing below | ||
- arm64-darwin | ||
|
||
- "x64-mingw-ucrt" | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: oxidize-rb/actions/setup-ruby-and-rust@main | ||
with: | ||
ruby-version: "3.1" | ||
rubygems: latest | ||
bundler-cache: false | ||
cargo-cache: true | ||
cargo-vendor: true | ||
|
||
- uses: oxidize-rb/cross-gem-action@main | ||
with: | ||
ruby-versions: '3.1' | ||
platform: ${{ matrix.platform }} | ||
env: | | ||
RUBY_CC_VERSION=3.1.0 | ||
- name: "Test gem build" | ||
run: | | ||
./script/test-gem-build gems ${{matrix.platform}} | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: "cruby-${{matrix.platform}}-gem" | ||
path: gems | ||
retention-days: 1 | ||
|
||
cruby-x86_64-linux-install: | ||
needs: ["cruby-package"] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ruby: ["3.1"] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
rubygems: latest | ||
ruby-version: "${{matrix.ruby}}" | ||
|
||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: cruby-x86_64-linux-gem | ||
path: gems | ||
- run: ./script/test-gem-install gems | ||
|
||
cruby-aarch64-linux-install: | ||
needs: ["cruby-package"] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ruby: ["3.1"] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
rubygems: latest | ||
ruby-version: "${{matrix.ruby}}" | ||
|
||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: cruby-aarch64-linux-gem | ||
path: gems | ||
|
||
- run: | | ||
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes | ||
docker run --rm -v "$(pwd):/commonmarker" -w /commonmarker \ | ||
--platform=linux/arm64/v8 \ | ||
ruby:${{matrix.ruby}} \ | ||
./script/test-gem-install gems | ||
cruby-x86_64-darwin-install: | ||
needs: ["cruby-package"] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ruby: ["3.1"] | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
rubygems: latest | ||
ruby-version: "${{matrix.ruby}}" | ||
|
||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: cruby-x86_64-darwin-gem | ||
path: gems | ||
|
||
- run: ./script/test-gem-install gems | ||
|
||
# FIXME: does not seem to work | ||
# cruby-x64-mingw-ucrt-install: | ||
# needs: ["cruby-package"] | ||
# strategy: | ||
# fail-fast: false | ||
# matrix: | ||
# ruby: ["3.1"] | ||
# runs-on: windows-latest | ||
# steps: | ||
# - uses: ruby/setup-ruby@v1 | ||
|
||
# with: | ||
# ruby-version: "${{matrix.ruby}}" | ||
|
||
# - uses: actions/download-artifact@v3 | ||
# with: | ||
# name: cruby-x64-mingw-ucrt-gem | ||
# path: gems | ||
|
||
# - run: | | ||
# gem update --system 3.3.22 --no-document | ||
# gem install --verbose --no-document gems/*.gem | ||
# gem list -d commonmarker | ||
# bundle exec ruby -e 'require "commonmarker"; puts Commonmarker.to_html("Hello, _world_")' |
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,91 @@ | ||
name: Test generic build and installation | ||
concurrency: | ||
group: "${{github.workflow}}-${{github.ref}}" | ||
cancel-in-progress: true | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
generic-package: | ||
name: "generic-package" | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: oxidize-rb/actions/setup-ruby-and-rust@main | ||
with: | ||
ruby-version: "3.1" | ||
rubygems: latest | ||
bundler-cache: false | ||
cargo-cache: true | ||
cargo-vendor: true | ||
|
||
- uses: oxidize-rb/cross-gem-action@main | ||
with: | ||
platform: x86_64-linux | ||
env: | | ||
RUBY_CC_VERSION=3.1.0 | ||
- run: ./script/test-gem-build gems ruby | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: generic-gem | ||
path: gems | ||
retention-days: 1 | ||
|
||
generic-linux-install: | ||
needs: ["generic-package"] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: ruby/setup-ruby-pkgs@v1 | ||
with: | ||
ruby-version: "3.1" | ||
|
||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: generic-gem | ||
path: gems | ||
- run: ./script/test-gem-install gems | ||
|
||
# FIXME: does not seem to work | ||
# generic-darwin-install: | ||
# needs: ["generic-package"] | ||
# runs-on: macos-latest | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
|
||
# - uses: ruby/setup-ruby@v1 | ||
# with: | ||
# ruby-version: "3.1" | ||
|
||
# - uses: actions/download-artifact@v3 | ||
# with: | ||
# name: generic-gem | ||
# path: gems | ||
# - run: ./script/test-gem-install gems | ||
|
||
# FIXME: does not seem to work | ||
# generic-windows-install-ucrt: | ||
# needs: ["generic-package"] | ||
# runs-on: windows-latest | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
|
||
# - uses: ruby/setup-ruby-pkgs@v1 | ||
# with: | ||
# ruby-version: "3.1" | ||
|
||
# - uses: actions/download-artifact@v3 | ||
# with: | ||
# name: generic-gem | ||
# path: gems | ||
# - run: | | ||
# gem update --system 3.3.22 --no-document | ||
# gem install --verbose --no-document gems/*.gem | ||
# gem list -d commonmarker | ||
# bundle exec ruby -e 'require "commonmarker"; puts Commonmarker.to_html("Hello, _world_")' |
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 |
---|---|---|
@@ -1,41 +1,33 @@ | ||
name: CI | ||
name: Test | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
- macos-latest | ||
- windows-latest | ||
ruby-version: [3.1, 3.0] | ||
|
||
runs-on: ${{ matrix.os }} | ||
ruby: | ||
- 3.1 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Ruby ${{ matrix.ruby-version }} | ||
uses: ruby/setup-ruby@v1 | ||
- uses: oxidize-rb/actions/setup-ruby-and-rust@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby-version }} | ||
bundler-cache: true # 'bundle install' and cache | ||
|
||
- name: Set Cargo triple | ||
if: runner.os == 'Windows' | ||
shell: bash | ||
run: rustup default stable-x86_64-pc-windows-gnu | ||
ruby-version: ${{ matrix.ruby }} | ||
rubygems: latest | ||
bundler-cache: true | ||
cargo-cache: true | ||
cache-version: v1 | ||
|
||
- name: Run ${{ matrix.os }} tests | ||
shell: bash | ||
run: script/cibuild | ||
- name: Run Ruby tests | ||
run: bundle exec rake compile test |
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 |
---|---|---|
|
@@ -5,6 +5,7 @@ inherit_gem: | |
|
||
AllCops: | ||
Exclude: | ||
- "pkg/**/*" | ||
- "ext/**/*" | ||
- "vendor/**/*" | ||
- "tmp/**/*" | ||
|
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,7 @@ | ||
{ | ||
"recommendations": [ | ||
"rust-lang.rust-analyzer", | ||
"bungcip.better-toml", | ||
"Shopify.ruby-lsp", | ||
] | ||
} |
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,3 @@ | ||
{ | ||
"rust-analyzer.checkOnSave.command": "clippy", | ||
} |
Oops, something went wrong.