From 28e1adfcfba7f7f8653bebd0669329fca794b596 Mon Sep 17 00:00:00 2001 From: kichikuou Date: Sun, 23 Feb 2020 16:43:44 +0900 Subject: [PATCH] Add GitHub workflow for emscripten build --- .github/workflows/emscripten.yml | 51 ++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/emscripten.yml diff --git a/.github/workflows/emscripten.yml b/.github/workflows/emscripten.yml new file mode 100644 index 0000000..e309c6d --- /dev/null +++ b/.github/workflows/emscripten.yml @@ -0,0 +1,51 @@ +name: Emscripten Build +on: [push] + +env: + emscripten-version: 1.39.8 + +jobs: + build: + runs-on: ubuntu-latest + steps: + + - uses: actions/checkout@v2 + + - name: Cache emsdk + uses: actions/cache@v1 + id: cache + with: + path: emsdk-cache + key: ${{ runner.os }}-emsdk-${{ env.emscripten-version }} + + - name: Cache .emscripten_cache + uses: actions/cache@v1 + with: + path: emscripten-cache + key: emscripten-cache-${{ env.emscripten-version }} + + - name: Setup Emscripten toolchain + uses: mymindstorm/setup-emsdk@v3 + with: + version: ${{ env.emscripten-version }} + actions-cache-folder: emsdk-cache + no-cache: true + + - name: Build + env: + EM_CACHE: ${{ github.workspace }}/emscripten-cache/cache + EM_PORTS: ${{ github.workspace }}/emscripten-cache/ports + run: | + mkdir -p emscripten-cache + mkdir -p out/wasm + cd out/wasm + emcmake cmake -DCMAKE_BUILD_TYPE=MinSizeRel ../../src/ + make + mkdir system3 + mv system3.* system3/ + + - name: Upload artifacts + uses: actions/upload-artifact@v1 + with: + name: system3-wasm + path: out/wasm/system3