-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
368 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
name: nightly | ||
on: | ||
# schedule: | ||
# - cron: '0 7 * * *' | ||
workflow_dispatch: | ||
jobs: | ||
# checks: | ||
# runs-on: ubuntu-latest | ||
# name: check for recent changes | ||
# outputs: | ||
# no_changes: ${{ steps.has_changes.outputs.no_changes }} | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# - name: print latest commit | ||
# run: echo ${{ github.sha }} | ||
# - id: has_changes | ||
# continue-on-error: true | ||
# name: check for recent changes | ||
# if: ${{ github.event_name == 'schedule' }} | ||
# run: test -z $(git rev-list --after="24 hours" ${{ github.sha }}) && echo "::set-output name=no_changes::true" | ||
windows: | ||
# needs: checks | ||
# if: ${{ needs.checks.outputs.no_changes != 'true' }} | ||
runs-on: windows-2019 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: use node v16 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: 'yarn' | ||
- name: install dependencies | ||
run: yarn install --ignore-scripts | ||
- name: build windows binaries | ||
run: yarn workspace @esfx/equatable run package-node-win32-x64 | ||
- name: upload build artifacts | ||
uses: actions/upload-artifact@v2.2.4 | ||
with: | ||
name: windows-artifacts | ||
path: | | ||
packages/equatable/build/stage/ | ||
linux: | ||
# needs: checks | ||
# if: ${{ needs.checks.outputs.no_changes != 'true' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: use node v16 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
- name: install dependencies | ||
run: yarn install --ignore-scripts | ||
- name: build linux binaries | ||
run: yarn workspace @esfx/equatable run package-node-linux-x64 | ||
- name: upload build artifacts | ||
uses: actions/upload-artifact@v2.2.4 | ||
with: | ||
name: linux-artifacts | ||
path: | | ||
packages/equatable/build/stage/ | ||
macos: | ||
# needs: checks | ||
# if: ${{ needs.checks.outputs.no_changes != 'true' }} | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: use node v16 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
- name: install dependencies | ||
run: yarn install --ignore-scripts | ||
- name: build macos binaries | ||
run: yarn workspace @esfx/equatable run package-node-darwin-x64 | ||
- name: upload build artifacts | ||
uses: actions/upload-artifact@v2.2.4 | ||
with: | ||
name: macos-artifacts | ||
path: | | ||
packages/equatable/build/stage/ | ||
js: | ||
# needs: checks | ||
# if: ${{ needs.checks.outputs.no_changes != 'true' }} | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: use node v16 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
- name: install dependencies | ||
run: yarn install --ignore-scripts | ||
- name: link workspace | ||
run: lerna link | ||
- name: prebuild | ||
run: yarn workspace @esfx/canceltoken run prebuild | ||
- name: build packages | ||
run: gulp ci --no-prebuild |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,225 @@ | ||
name: publish | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: Version number to publish | ||
required: true | ||
type: string | ||
default: 1.0.0-pre.37 | ||
force_publish: | ||
description: Whether to force publication of all packages | ||
required: false | ||
type: boolean | ||
default: false | ||
prerelease: | ||
description: Whether the associated GitHub Release should be marked as a prerelease | ||
required: false | ||
type: boolean | ||
default: true | ||
draft: | ||
description: Whether the associated GitHub Release should be marked as a draft | ||
required: false | ||
type: boolean | ||
default: true | ||
jobs: | ||
# Apply version information for packages we are about to publish | ||
version: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
changed_packages: ${{ fromJSON(steps.changed_packages.outputs.changed_packages) }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: 'yarn' | ||
- name: yarn install | ||
run: yarn install --ignore-scripts | ||
- name: lerna version | ||
run: lerna version ${{ github.event.inputs.version }} --no-git-tag-version --no-push --yes $([ ${{github.event.inputs.force_publish }} == true ] && echo "--force-publish") | ||
- name: upload version artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: version-artifacts | ||
path: | | ||
internal/*/package*.json | ||
packages/*/package*.json | ||
package.json | ||
lerna.json | ||
yarn.lock | ||
- name: capture changed packages | ||
id: changed_packages | ||
run: | | ||
echo "::set-output name=changed_packages::$(CHANGED_PACKAGE_LIST=$(git status --porcelain -- internal/*/package.json packages/*/package.json | cut -c 4-) node -e 'process.stdout.write(JSON.stringify(process.env.CHANGED_PACKAGE_LIST.split(/\n/g).filter(Boolean).reduce((obj, path) => ({ ...obj, [path]: true }), {})))')"; | ||
js: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- version | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: 'yarn' | ||
- name: sync version | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: version-artifacts | ||
path: ${{ github.workspace }} | ||
- name: yarn install | ||
run: yarn install --ignore-scripts --frozen-lockfile --non-interactive | ||
- name: lerna link | ||
run: lerna link | ||
- name: build | ||
run: yarn run build-js | ||
- name: test | ||
run: yarn run test | ||
- name: upload build artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: js-artifacts | ||
path: | | ||
internal/*/dist/** | ||
packages/*/dist/** | ||
windows: | ||
# TODO: Do not build for windows if binary packages not included in changed packages | ||
# TODO: Test windows binaries | ||
runs-on: windows-2019 | ||
needs: | ||
- version | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: use node v16 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: 'yarn' | ||
- name: sync version | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: version-artifacts | ||
path: ${{ github.workspace }} | ||
- name: yarn install | ||
run: yarn install --ignore-scripts --frozen-lockfile --non-interactive | ||
- name: build windows binaries | ||
run: yarn run build-windows | ||
- name: upload build artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: windows-artifacts | ||
path: packages/equatable/build/stage/** | ||
linux: | ||
# TODO: Do not build for linux if binary packages not included in changed packages | ||
# TODO: Test linux binaries | ||
runs-on: ubuntu-latest | ||
needs: | ||
- version | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: use node v16 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
- name: sync version | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: version-artifacts | ||
path: ${{ github.workspace }} | ||
- name: yarn install | ||
run: yarn install --ignore-scripts --frozen-lockfile --non-interactive | ||
- name: build linux binaries | ||
run: yarn run build-linux | ||
- name: upload build artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: linux-artifacts | ||
path: | | ||
packages/equatable/build/stage/** | ||
macos: | ||
# TODO: Do not build for macos if binary packages not included in changed packages | ||
# TODO: Test macos binaries | ||
runs-on: macos-latest | ||
needs: | ||
- version | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: use node v16 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
- name: sync version | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: version-artifacts | ||
path: ${{ github.workspace }} | ||
- name: yarn install | ||
run: yarn install --ignore-scripts --frozen-lockfile --non-interactive | ||
- name: build macos binaries | ||
run: yarn run build-macos | ||
- name: upload build artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: macos-artifacts | ||
path: | | ||
packages/equatable/build/stage/** | ||
# TODO: Build docs on windows | ||
package: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- js | ||
- windows | ||
- linux | ||
- macos | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: use node v16 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
- name: sync version | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: version-artifacts | ||
path: ${{ github.workspace }} | ||
- name: yarn install | ||
run: yarn install --ignore-scripts --frozen-lockfile --non-interactive | ||
- name: lerna link | ||
run: lerna link | ||
- name: download js build artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: js-artifacts | ||
path: ${{ github.workspace }} | ||
- name: download windows build artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: windows-artifacts | ||
path: packages/equatable/build/stage | ||
- name: download linux build artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: linux-artifacts | ||
path: packages/equatable/build/stage | ||
- name: download macos build artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: macos-artifacts | ||
path: packages/equatable/build/stage | ||
- name: verify packages with prepack # NOTE: this is temporary and will be removed | ||
run: yarn workspaces run prepack | ||
- name: verify binaries # NOTE: this is temporary and will be removed | ||
run: | | ||
test -f packages/equatable/build/stage/${{ github.event.inputs.version }}/hashCodeNative-v${{ github.event.inputs.version }}-node-v102-win32-x64.tar.gz || (echo "missing windows binary" && exit 1) | ||
test -f packages/equatable/build/stage/${{ github.event.inputs.version }}/hashCodeNative-v${{ github.event.inputs.version }}-node-v102-linux-x64.tar.gz || (echo "missing linux binary" && exit 1) | ||
test -f packages/equatable/build/stage/${{ github.event.inputs.version }}/hashCodeNative-v${{ github.event.inputs.version }}-node-v102-darwin-x64.tar.gz || (echo "missing macos binary" && exit 1) | ||
- name: list outputs # NOTE: this is temporary and will be removed | ||
run: | | ||
find internal/*/dist/** packages/*/dist/** packages/*/build/stage/** -type f | ||
# TODO: Create git commit | ||
# TODO: Tag release | ||
# TODO: Publish release on GitHub | ||
# TODO: Publish binaries to GitHub Release | ||
# TODO: Publish to NPM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,5 +14,4 @@ | |
.vscode | ||
.npmfiles | ||
__tests__ | ||
__perf__ | ||
binding.gyp_ | ||
__perf__ |
File renamed without changes.
Oops, something went wrong.