Skip to content

Commit

Permalink
Try writing a CI build
Browse files Browse the repository at this point in the history
  • Loading branch information
Birch-san authored Dec 27, 2024
1 parent 9952607 commit 4766053
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Build box2d3-wasm

on:
# release:
# types: [created]
workflow_dispatch:

env:
EM_VERSION: 3.1.73
EM_CACHE_FOLDER: 'emsdk-cache'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup cache
id: cache-system-libraries
uses: actions/cache@v4
with:
path: ${{env.EM_CACHE_FOLDER}}
key: ${{env.EM_VERSION}}-${{ runner.os }}
- uses: mymindstorm/setup-emsdk@v14
with:
version: ${{env.EM_VERSION}}
actions-cache-folder: ${{env.EM_CACHE_FOLDER}}
- uses: actions/setup-node@v4
with:
node-version: 20
- name: install global deps
run: npm i -g typescript yarn
- name: build makefile
working-directory: box2d3-wasm
run: shell/0_build_makefile.sh
env:
FLAVOUR: simd
TARGET_TYPE: Debug
- name: emmake
working-directory: box2d3-wasm
run: emmake make -j8 -C cmake-build
- name: build wasm
working-directory: box2d3-wasm
run: shell/1_build_wasm.sh
env:
FLAVOUR: simd
TARGET_TYPE: Debug

# publish-gpr:
# needs: build
# runs-on: ubuntu-latest
# permissions:
# contents: read
# packages: write
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-node@v4
# with:
# node-version: 20
# registry-url: https://npm.pkg.github.com/
# - run: npm ci
# - run: npm publish
# env:
# NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 comments on commit 4766053

Please sign in to comment.