Skip to content
This repository has been archived by the owner on May 10, 2023. It is now read-only.

Commit

Permalink
Update linker env var and use latest rb-sys
Browse files Browse the repository at this point in the history
  • Loading branch information
ianks committed Aug 1, 2022
1 parent b8c2825 commit ebc7b38
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
8 changes: 4 additions & 4 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions src/compile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ export async function compileGem(input: Input): Promise<void> {

if (input.useRubyLinkerForCargo) {
const rustPlatform = (await fetchRubyToRustMapping())[input.platform]
const envVar = `CARGO_TARGET_${rustPlatform

const envVar = `CARGO_TARGET_${rustPlatform}_LINKER`
.replace('-', '_')
.toUpperCase()}_LINKER`
.toUpperCase()

const linker = LINKER_MAPPING[input.platform]

if (linker) {
steps.unshift(`export ${envVar}=${linker}`)
steps.unshift(`export ${envVar}="${linker}"`)
} else {
core.setOutput('warning', `No linker mapping for ${input.platform}`)
}
Expand Down
2 changes: 1 addition & 1 deletion src/input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export async function loadInput(): Promise<Input> {
return {
platform,
directory,
version: getInput('version') || '0.9.27',
version: getInput('version') || '0.9.28',
useRubyLinkerForCargo: getInput('use-ruby-linker-for-cargo') === 'true',
env: getInput('env') || null,
setup: getInput('setup') || 'bundle install || gem install rb_sys',
Expand Down

0 comments on commit ebc7b38

Please sign in to comment.