-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[CI/CD] Use Docker image through Build pipeline
- Loading branch information
Showing
4 changed files
with
2,592 additions
and
20 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,78 @@ | ||
name: Release | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
types: | ||
- closed | ||
|
||
env: | ||
EM_VERSION: 3.1.72 | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
matrix: | ||
node-version: [20] | ||
permissions: | ||
contents: read | ||
id-token: write | ||
# releaseブランチからmainにPRがマージされたら | ||
if: | | ||
github.event.pull_request.merged == true | ||
&& startsWith(github.head_ref, 'release/v') | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: mymindstorm/setup-emsdk@v14 | ||
with: | ||
version: ${{env.EM_VERSION}} | ||
|
||
- name: resolve git submodule | ||
run: git submodule update --init --recursive | ||
|
||
- name: Build spz wasm binary | ||
run: | | ||
cd ./packages/core/lib/spz-wasm | ||
mkdir ./build | ||
em++ main.cpp \ | ||
-Oz \ | ||
--closure 1 \ | ||
--llvm-lto 1 \ | ||
-fno-exceptions \ | ||
--std=c++17 \ | ||
-lembind \ | ||
--emit-tsd main.d.ts \ | ||
-o ./build/main.mjs \ | ||
-s USE_ZLIB=1 \ | ||
-s WASM=1 \ | ||
-s SINGLE_FILE=1 \ | ||
-s MODULARIZE=1 \ | ||
-s EXPORT_ES6=1 \ | ||
-s EXPORT_NAME="spzwasm" \ | ||
-s ALLOW_MEMORY_GROWTH \ | ||
-s EXPORTED_FUNCTIONS="['_malloc', '_free']" | ||
- name: Install pnpm | ||
uses: pnpm/action-setup@v4 | ||
with: | ||
version: 9 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: "pnpm" | ||
registry-url: https://registry.npmjs.org | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Build | ||
run: pnpm build | ||
|
||
- name: Publish | ||
run: pnpm publish:all | ||
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,11 @@ | ||
{ | ||
"$schema": "node_modules/@lerna-lite/cli/schemas/lerna-schema.json", | ||
"version": "0.0.0", | ||
"packages": ["packages/*"], | ||
"npmClient": "pnpm", | ||
"command": { | ||
"version": { | ||
"allowBranch": ["release/v*"] | ||
} | ||
} | ||
} |
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
Oops, something went wrong.