Skip to content

Commit 28d9a13

Browse files
committed
Use new location for OpenSSL in new GHA Mac images
Fixes #10
1 parent 1beaa07 commit 28d9a13

File tree

5 files changed

+36
-13
lines changed

5 files changed

+36
-13
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@ jobs:
5757
crystal --version | grep "$v"
5858
if: ${{ contains(matrix.config.crystal, '.') }}
5959
- run: |
60-
crystal eval 'require "yaml"'
61-
- run: |
62-
crystal eval 'require "openssl"; require "big"; require "xml"'
60+
crystal eval 'require "openssl"; require "yaml"; require "xml"; require "big"'
6361
if: ${{ runner.os != 'Windows' }}
6462
6563
- run: |

.github/workflows/release.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@ jobs:
5757
crystal --version | grep "$v"
5858
if: ${{ contains(matrix.config.crystal, '.') }}
5959
- run: |
60-
crystal eval 'require "yaml"'
61-
- run: |
62-
crystal eval 'require "openssl"; require "big"; require "xml"'
60+
crystal eval 'require "openssl"; require "yaml"; require "xml"; require "big"'
6361
if: ${{ runner.os != 'Windows' }}
6462
6563
- run: |

index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ const Core = require("@actions/core");
22
const ToolCache = require("@actions/tool-cache");
33
const Cache = require("@actions/cache");
44
const IO = require("@actions/io");
5+
const Glob = require("@actions/glob");
56
const Octokit = require("@octokit/request");
67
const fetch = require("node-fetch");
78
const Path = require("path");
@@ -141,7 +142,11 @@ async function installCrystalForMac({crystal, shards, arch = "x86_64", path}) {
141142
} catch (e) {}
142143
}
143144

144-
let pkgConfigPath = "/usr/local/opt/openssl/lib/pkgconfig";
145+
const globber = await Glob.create([
146+
"/usr/local/Cellar/openssl*/*/lib/pkgconfig",
147+
"/usr/local/opt/openssl/lib/pkgconfig",
148+
].join("\n"));
149+
let [pkgConfigPath] = await globber.glob();
145150
if (process.env["PKG_CONFIG_PATH"]) {
146151
pkgConfigPath += Path.delimiter + process.env["PKG_CONFIG_PATH"];
147152
}

package-lock.json

Lines changed: 27 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"dependencies": {
2727
"@actions/cache": "^1.0.7",
2828
"@actions/core": "^1.4.0",
29+
"@actions/glob": "^0.2.0",
2930
"@actions/io": "^1.1.1",
3031
"@actions/tool-cache": "^1.7.1",
3132
"@octokit/request": "^5.6.0",

0 commit comments

Comments
 (0)