Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to GitHub actions, platform-specific packages, and add arm prebuilds #144

Merged
merged 34 commits into from
Jul 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
f984adc
Setup github actions to run tests
devongovett Jun 25, 2023
bf770d4
disable azure
devongovett Jun 25, 2023
c59f32b
wip
devongovett Jun 25, 2023
075773d
wip
devongovett Jun 25, 2023
462c4e1
wip
devongovett Jun 25, 2023
1b9a921
wip
devongovett Jun 25, 2023
d5b22e6
wip
devongovett Jun 25, 2023
c95b8c3
wip
devongovett Jun 25, 2023
f03b034
wip
devongovett Jun 25, 2023
5ffbbd0
wip release
devongovett Jun 25, 2023
6a8e689
wip
devongovett Jun 25, 2023
fe7f75e
wip
devongovett Jun 25, 2023
3e9f00c
wip
devongovett Jun 25, 2023
cf090b7
wip
devongovett Jun 25, 2023
b0ff4f3
wip
devongovett Jun 25, 2023
5cf5210
update things
devongovett Jun 25, 2023
5aa81af
why u no run?
devongovett Jun 25, 2023
038f9b0
huh
devongovett Jun 25, 2023
eb9050d
wat
devongovett Jun 25, 2023
88dfc87
Tag correct libc
devongovett Jun 25, 2023
14c2301
Build npm packages
devongovett Jun 25, 2023
f9bb8fc
wip
devongovett Jun 25, 2023
342da29
wip
devongovett Jun 25, 2023
b417128
wip
devongovett Jun 25, 2023
dbf5c0d
plz
devongovett Jun 25, 2023
60662db
Test publishing
devongovett Jun 25, 2023
29a203a
Add windows arm64 and android prebuilds
devongovett Jun 25, 2023
11ffd72
Use node 20 for windows arm64 build
devongovett Jun 26, 2023
9279006
fix
devongovett Jun 26, 2023
764d2c9
Run on release
devongovett Jun 26, 2023
fc9718a
stray console.log
devongovett Jun 26, 2023
e4d4602
Delete azure pipelines and old docker agents
Jul 2, 2023
1d8f752
attempt alternate fix for homebrew
Jul 2, 2023
0c2984e
Just get rid of homebrew entirely
Jul 2, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 101 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: release
on:
workflow_dispatch:
release:
types: [published]

jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
arch: x64
node: 16
- os: windows-latest
arch: arm64
node: 20
- os: macos-latest
arch: x64
node: 16
- os: macos-latest
arch: arm64
node: 16
- os: ubuntu-latest
arch: x64
libc: glibc
image: ghcr.io/prebuild/centos7-devtoolset7:2.1.1
node: 16
- os: ubuntu-latest
arch: x64
libc: musl
image: ghcr.io/prebuild/alpine:2.1.1
node: 16
- os: ubuntu-latest
arch: arm64
libc: glibc
image: ghcr.io/prebuild/linux-arm64-lts:2.1.1
node: 16
- os: ubuntu-latest
arch: arm64
libc: musl
image: ghcr.io/prebuild/linux-arm64-musl:2.1.1
node: 16
- os: ubuntu-latest
arch: arm
libc: glibc
image: ghcr.io/prebuild/linux-armv7:2.1.1
node: 16
- os: ubuntu-latest
arch: arm64
image: ghcr.io/prebuild/android-arm64:2.1.1
node: 16
runs-on: ${{matrix.os}}
container:
image: ${{matrix.image}}
options: -u root
steps:
- uses: actions/checkout@v3
- run: corepack enable
- uses: actions/setup-node@v3
with:
cache: yarn
node-version: ${{matrix.node}}
- run: yarn --frozen-lockfile --ignore-scripts
- run: yarn prebuild --arch ${{ matrix.arch }} -t ${{ matrix.node }}.0.0
env:
PREBUILD_LIBC: ${{ matrix.libc }}
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: prebuilds
path: prebuilds

release:
runs-on: ubuntu-latest
needs:
- build
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: yarn
node-version: 16
- name: Download artifacts
uses: actions/download-artifact@v3
- name: Build npm packages
run: node scripts/build-npm.js
- name: Publish to npm
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > ~/.npmrc
for pkg in npm/*; do
echo "Publishing $pkg..."
cd $pkg;
npm publish;
cd ../..;
done
echo "Publishing @parcel/watcher..."
npm publish
53 changes: 53 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: test
on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
test:
strategy:
fail-fast: false
matrix:
node: [16, 18, 20]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: yarn
node-version: ${{matrix.node}}
- name: Install watchman
if: ${{ matrix.os == 'macos-latest' }}
run: |
wget https://github.com/facebook/watchman/releases/download/v2023.05.01.00/watchman-v2023.05.01.00-macos.zip
unzip watchman-*-macos.zip
cd watchman-v2023.05.01.00-macos
sudo mkdir -p /usr/local/{bin,lib} /usr/local/var/run/watchman
sudo cp bin/* /usr/local/bin
sudo cp lib/* /usr/local/lib
sudo chmod 755 /usr/local/bin/watchman
sudo chmod 2777 /usr/local/var/run/watchman
watchman -v
- name: Install watchman
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
wget https://github.com/facebook/watchman/releases/download/v2023.06.19.00/watchman-v2023.06.19.00-linux.zip
unzip watchman-*-linux.zip
cd watchman-v2023.06.19.00-linux
sudo mkdir -p /usr/local/{bin,lib} /usr/local/var/run/watchman
sudo cp bin/* /usr/local/bin
sudo cp lib/* /usr/local/lib
sudo chmod 755 /usr/local/bin/watchman
sudo chmod 2777 /usr/local/var/run/watchman
- name: Copy watchman
if: ${{ matrix.os == 'windows-latest' }}
run: |
Copy-Item -Recurse -Path watchman -Destination $home
$env:PATH += ";$home\watchman\windows\bin"
Add-Content $env:GITHUB_PATH "$home\watchman\windows\bin"
watchman -v
- run: yarn --frozen-lockfile
- run: yarn test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ token.txt
stress-test
crash.log
test/snapshot.txt
npm
21 changes: 0 additions & 21 deletions Makefile

This file was deleted.

61 changes: 0 additions & 61 deletions azure-pipelines-template.yml

This file was deleted.

63 changes: 0 additions & 63 deletions azure-pipelines.yml

This file was deleted.

6 changes: 4 additions & 2 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"defines": [ "NAPI_DISABLE_CPP_EXCEPTIONS" ],
"sources": [ "src/binding.cc", "src/Watcher.cc", "src/Backend.cc", "src/DirTree.cc", "src/Glob.cc" ],
"include_dirs" : ["<!(node -p \"require('node-addon-api').include_dir\")"],
"dependencies": ["<!(node -p \"require('node-addon-api').gyp\")"],
'cflags!': [ '-fno-exceptions' ],
'cflags_cc!': [ '-fno-exceptions' ],
"conditions": [
Expand Down Expand Up @@ -69,5 +68,8 @@
}]
]
}
]
],
"variables": {
"openssl_fips": ""
}
}
55 changes: 0 additions & 55 deletions docker-agents/alpine.Dockerfile

This file was deleted.

Loading