Skip to content

Commit 64065a4

Browse files
committed
ci: update mac builds to use macos-12, install openssl arm64 binaries when building for macos M1
1 parent f0247c4 commit 64065a4

File tree

4 files changed

+42
-18
lines changed

4 files changed

+42
-18
lines changed

.github/workflows/release.yml

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,27 @@ on:
66
- v*.*.*
77

88
jobs:
9-
electron:
9+
build:
1010
runs-on: ${{ matrix.os }}
1111

1212
strategy:
1313
matrix:
14-
os: [ubuntu-latest, macos-11, windows-latest]
14+
os: [ubuntu-latest, macos-12, windows-latest]
1515
version: [
16-
{ node: 16.14.2, electron: 19.0.3 }
16+
{ node: 16.14.2, electron: 19.0.4 }
1717
]
1818

1919
steps:
2020
- name: Checkout git repository
21-
uses: actions/checkout@v2
21+
uses: actions/checkout@v3
2222

2323
- name: Install node
24-
uses: actions/setup-node@v2
24+
uses: actions/setup-node@v3
2525
env:
2626
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
2727
with:
2828
node-version: ${{ matrix.version.node }}
29-
check-latest: true
3029
cache: 'npm'
31-
cache-dependency-path: package-lock.json
3230

3331
- name: Setup (linux)
3432
if: matrix.os == 'ubuntu-latest'
@@ -44,7 +42,7 @@ jobs:
4442
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
4543

4644
- name: Setup (macos)
47-
if: matrix.os == 'macos-11'
45+
if: matrix.os == 'macos-12'
4846
run: |
4947
npm config set openssl_dir /usr/local/opt/[email protected]
5048
@@ -72,8 +70,17 @@ jobs:
7270
npx node-pre-gyp package --runtime=electron --target=${{ matrix.version.electron }}
7371
npx node-pre-gyp-github publish
7472
73+
- name: Setup (macos M1)
74+
if: matrix.os == 'macos-12'
75+
run: |
76+
brew install grep
77+
brew uninstall --ignore-dependencies [email protected]
78+
FILE=$(brew fetch --force --bottle-tag=arm64_big_sur [email protected] | ggrep -oP '(?<=Downloaded to\: ).*')
79+
echo "$FILE"
80+
brew install "$FILE"
81+
7582
- name: Install (macos M1)
76-
if: matrix.os == 'macos-11'
83+
if: matrix.os == 'macos-12'
7784
env:
7885
CC: clang
7986
CXX: clang++
@@ -83,7 +90,7 @@ jobs:
8390
run: npm ci --arch=arm64 --runtime=electron --target=${{ matrix.version.electron }} --target_arch=arm64 --disturl=https://electronjs.org/headers --build_from_source=true
8491

8592
- name: Deploy (macos M1)
86-
if: matrix.os == 'macos-11'
93+
if: matrix.os == 'macos-12'
8794
env:
8895
NODE_PRE_GYP_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8996
run: |
@@ -92,8 +99,25 @@ jobs:
9299
npx node-pre-gyp package --runtime=electron --target=${{ matrix.version.electron }} --arch=arm64 --target_arch=arm64
93100
npx node-pre-gyp-github publish
94101
95-
- name: Publish
102+
- name: Upload artifact
96103
if: matrix.os == 'ubuntu-latest'
104+
uses: actions/upload-artifact@v3
105+
with:
106+
name: build-ubuntu
107+
path: ${{ github.workspace }}
108+
if-no-files-found: error
109+
retention-days: 5
110+
111+
publish:
112+
runs-on: ubuntu-latest
113+
needs: build
114+
steps:
115+
- name: Download artifact
116+
uses: actions/download-artifact@v3
117+
with:
118+
name: build-ubuntu
119+
120+
- name: Publish
97121
env:
98122
NPM_PUBLISH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
99123
run: |

.github/workflows/test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313

1414
strategy:
1515
matrix:
16-
os: [ubuntu-latest, macos-11, windows-latest]
16+
os: [ubuntu-latest, macos-12, windows-latest]
1717

1818
steps:
1919
- name: Checkout git repository
@@ -43,7 +43,7 @@ jobs:
4343
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
4444

4545
- name: Setup (macos)
46-
if: matrix.os == 'macos-11'
46+
if: matrix.os == 'macos-12'
4747
run: |
4848
npm config set openssl_dir /usr/local/opt/[email protected]
4949
@@ -54,7 +54,7 @@ jobs:
5454
npm config set openssl_dir "C:\Program Files\OpenSSL-Win64"
5555
5656
- name: Setup for tests (linux, macos)
57-
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-11'
57+
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-12'
5858
run: |
5959
mkdir ~/.ssh_tests
6060
chmod 700 ~/.ssh_tests
@@ -83,7 +83,7 @@ jobs:
8383
run: npm ci
8484

8585
- name: Test (linux, macos)
86-
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-11'
86+
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-12'
8787
run: |
8888
set -e
8989
eval `ssh-agent -s`

package-lock.json

Lines changed: 2 additions & 2 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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@git-glint/nodegit",
33
"description": "Node.js libgit2 asynchronous native bindings",
4-
"version": "0.28.0-alpha.28",
4+
"version": "0.28.0-alpha.100",
55
"homepage": "http://nodegit.org",
66
"keywords": [
77
"libgit2",

0 commit comments

Comments
 (0)