Skip to content

Commit 5bc4eb3

Browse files
committed
WIP
1 parent 10f893f commit 5bc4eb3

File tree

3 files changed

+17
-12
lines changed

3 files changed

+17
-12
lines changed

.github/actions/easy_compile/action.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,9 @@ inputs:
1313
description: "TODO this is needed to install the Easy Compile gem from the GitHub repo. Can be removed "
1414
required: false
1515
outputs:
16-
latest_supported_ruby_version:
17-
description: "The most recent ruby versions (from a list) this gem is compatible with."
18-
value: ${{ steps.get_versions.outputs.latest_supported_ruby_version }}
1916
runtime_version_for_compilation:
2017
description: "The ruby version used for compiling fat gems."
2118
value: ${{ steps.get_versions.outputs.runtime_version_for_compilation }}
22-
ruby_versions_for_testing:
23-
description: "An array of ruby versions selected from a list, compatible with the gem."
24-
value: ${{ steps.get_versions.outputs.ruby_versions_for_testing }}
2519

2620
runs:
2721
using: "composite"
@@ -34,19 +28,19 @@ runs:
3428
token: ${{ inputs.token }}
3529
- name: Install easy compile # TODO this can be removed once this tool is pusblished on RubyGems
3630
shell: bash
37-
run: "rake install --local"
31+
run: "sudo rake install"
3832
working-directory: "tmp"
3933
- name: "Outputs the ruby versions needed for compilation"
40-
if: "${{ inputs.step == 'get_versions' }}"
34+
if: "${{ inputs.step == 'compile' }}"
4135
working-directory: ${{ inputs.working-directory }}
4236
shell: bash
4337
id: get_versions
44-
run: easy_compile get_versions
38+
run: easy_compile runtime_version_for_compilation
4539
- name: "Setup Ruby"
4640
if: "${{ inputs.step == 'compile' }}"
4741
uses: "ruby/setup-ruby@v1"
4842
with:
49-
ruby-version: "3.4.7"
43+
ruby-version: ${{ steps.get_versions.outputs.runtime_version_for_compilation }}
5044
- name: "Setup Rake Compiler"
5145
if: "${{ inputs.step == 'compile' }}"
5246
uses: actions/github-script@v8

.github/workflows/e2e-dummy-gem.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,15 @@ jobs:
1111
steps:
1212
- name: "Checkout code"
1313
uses: "actions/checkout@v5"
14-
- run: sudo rake install
14+
- name: "Setup Ruby"
15+
uses: "ruby/setup-ruby@v1"
16+
with:
17+
ruby-version: ${{ needs.get_versions.outputs.runtime_version_for_compilation }}
18+
bundler-cache: true
19+
working-directory: "test/fixtures/dummy_gem"
20+
- name: "Run easy compile"
21+
uses: "./.github/actions/easy_compile"
22+
with:
23+
step: "compile"
24+
token: ${{ secrets.GITHUB_TOKEN }}
25+
working-directory: "test/fixtures/dummy_gem"

lib/easy_compile/cli.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def package
5656
requirement will change which will break the workflow. This also allow to determine the Ruby
5757
versions dynamically based on the running platform.
5858
MSG
59-
def get_versions
59+
def runtime_version_for_compilation
6060
ruby_requirements = compilation_task.gemspec.required_ruby_version
6161
outputs = [
6262
"latest_supported_ruby_version=#{RubySeries.latest_version_for_requirements(ruby_requirements)}",

0 commit comments

Comments
 (0)