Skip to content

Commit

Permalink
Simplify my life by removing paranoia tests
Browse files Browse the repository at this point in the history
Commonmarker currently has three different test suites related to the
gem build:

1. The compilation output is tested
2. The gem can be installed on another platform
3. A generic version of the gem can be installed on a platform with
sufficient Ruby/Rust tooling

Of these, only the first is the most relevant. #2 suggests an error in
the build pipeline, and #3 opens the door to supporting platforms that
are uncommon. In order to minimize support work
on my end, I'm going to nix the last two tests; as
well, I can abstract the first test into a GitHub Action for other
oxidizers to use.
  • Loading branch information
gjtorikian committed Feb 26, 2023
1 parent d3094a2 commit a835c75
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 204 deletions.
101 changes: 3 additions & 98 deletions .github/workflows/cruby-build-and-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,102 +47,7 @@ jobs:
platform: ${{ matrix.platform }}
ruby-versions: "3.1,3.2" # SUPPORTED_RUBY_VERSIONS

- name: "Test gem build"
run: |
./script/test-gem-build gems ${{matrix.platform}}
- uses: actions/upload-artifact@v3
with:
name: "${{ env.CACHE_KEY_PREFIX }}-${{matrix.platform}}-gem"
path: ${{ steps.cross-gem.outputs.gem-path }}
retention-days: 1

cruby-x86_64-linux-install:
needs: ["cruby-package"]
strategy:
fail-fast: false
matrix:
ruby: ["3.1", "3.2"] # SUPPORTED_RUBY_MATRIX
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: ${{ env.CACHE_KEY_PREFIX }}-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", "3.2"] # SUPPORTED_RUBY_MATRIX
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: ruby/setup-ruby@v1
- uses: oxidize-rb/actions/cross-gem@add-test-scripts
with:
rubygems: latest
ruby-version: "${{matrix.ruby}}"

- uses: actions/download-artifact@v3
with:
name: ${{ env.CACHE_KEY_PREFIX }}-aarch64-linux-gem
path: gems

- run: ./script/test-gem-install gems

cruby-x86_64-darwin-install:
needs: ["cruby-package"]
strategy:
fail-fast: false
matrix:
ruby: ["3.1", "3.2"] # SUPPORTED_RUBY_MATRIX
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: ${{ env.CACHE_KEY_PREFIX }}-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_")'
platform: ${{ matrix.platform }}
ruby-versions: "3.1,3.2" # SUPPORTED_RUBY_VERSIONS
106 changes: 0 additions & 106 deletions .github/workflows/generic-build-and-install.yml

This file was deleted.

0 comments on commit a835c75

Please sign in to comment.