-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add Darwin ARM64 prebuild (#48)
Also switch to using semantic releases.
- Loading branch information
Showing
6 changed files
with
27 additions
and
30 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 |
---|---|---|
|
@@ -13,8 +13,10 @@ jobs: | |
name: Test | ||
timeout-minutes: 10 | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
outputs: | ||
tagged: ${{ format(steps.check-version.outputs.exists == 'false') }} | ||
new-version: ${{ steps.bump-version.outputs.new_version }} | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v4 | ||
|
@@ -42,31 +44,16 @@ jobs: | |
- name: Test | ||
run: pnpm t | ||
- name: Upload coverage | ||
uses: codecov/codecov-action@v3 | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
directory: out/coverage | ||
- name: Extract version | ||
id: extract-version | ||
run: | | ||
version="$(node -p 'require("./package.json").version')" | ||
echo "version=$version" >>"$GITHUB_OUTPUT" | ||
- name: Check if tag exists | ||
uses: mukunku/[email protected] | ||
id: check-version | ||
with: | ||
tag: v${{ steps.extract-version.outputs.version }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Create tag | ||
if: steps.check-version.outputs.exists == 'false' | ||
uses: pkgdeps/git-tag-action@v2 | ||
- name: Bump version and create tag | ||
id: bump-version | ||
uses: mathieudutour/[email protected] | ||
with: | ||
git_commit_sha: ${{ github.sha }} | ||
git_tag_prefix: v | ||
github_repo: ${{ github.repository }} | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
version: ${{ steps.extract-version.outputs.version }} | ||
default_bump: false | ||
prebuild-native: | ||
strategy: | ||
matrix: | ||
|
@@ -75,12 +62,13 @@ jobs: | |
os: ubuntu-22.04 | ||
- key: darwin-x64 | ||
os: macos-12 | ||
# TODO: darwin-arm64 (https://github.com/github/roadmap/issues/528) | ||
- key: darwin-arm64 | ||
os: macos-14 | ||
name: Prebuild ${{ matrix.key }} | ||
timeout-minutes: 25 | ||
runs-on: ${{ matrix.os }} | ||
needs: test | ||
if: needs.test.outputs.tagged == 'true' | ||
if: needs.test.outputs.new-version != '' | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v4 | ||
|
@@ -131,7 +119,7 @@ jobs: | |
timeout-minutes: 90 | ||
runs-on: ubuntu-latest | ||
needs: test | ||
if: needs.test.outputs.tagged == 'true' | ||
if: needs.test.outputs.new-version != '' | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v4 | ||
|
@@ -188,6 +176,7 @@ jobs: | |
name: Publish packages | ||
timeout-minutes: 5 | ||
needs: | ||
- test | ||
- prebuild-native | ||
- prebuild-docker | ||
runs-on: ubuntu-latest | ||
|
@@ -218,11 +207,13 @@ jobs: | |
mv out/prebuilds/*/* packages/highs-addon/prebuilds | ||
ls packages/highs-addon/prebuilds | ||
- name: Point to NPM registry | ||
uses: actions/setup-node@v3 | ||
uses: actions/setup-node@v4 | ||
with: | ||
cache: pnpm | ||
registry-url: https://registry.npmjs.org | ||
- name: Publish | ||
run: pnpm -r exec pnpm publish | ||
run: | | ||
pnpm -r exec pnpm version ${{ needs.test.outputs.new-version }} | ||
pnpm -r exec pnpm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
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,6 @@ | ||
plugins: | ||
- - '@semantic-release/commit-analyzer' | ||
- preset: conventionalcommits | ||
parserOpts: | ||
breakingHeaderPattern: '' | ||
headerPattern: '/^(\w*)(?:\\((.*)\\))?!?: (.*)$/' |
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 |
---|---|---|
@@ -1,12 +1,11 @@ | ||
{ | ||
"name": "highs-packages", | ||
"version": "0.6.6", | ||
"version": "0.0.0", | ||
"private": true, | ||
"repository": "github:opvious/highs.ts", | ||
"author": "Opvious Engineering <[email protected]>", | ||
"license": "Apache-2.0", | ||
"scripts": { | ||
"bump": "pnpm -r --include-workspace-root exec npm version ${BUMP:-patch}", | ||
"clean": "pnpm -r -F !. run clean && rm -rf node_modules out", | ||
"fix": "prettier --write 'packages/*/*.ts' 'packages/*/{src,test}/**/*.ts' && pnpm run lint --fix", | ||
"lint": "eslint 'packages/*/*.ts' 'packages/*/{src,test}/**/*.ts'", | ||
|
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