From c4224acebc081ded7a0b6fadfe9ce57c930d5185 Mon Sep 17 00:00:00 2001 From: Alexander Guryanov Date: Sat, 18 Nov 2023 23:38:34 +0300 Subject: [PATCH] Update build script --- .github/workflows/build.js.yml | 9 +++++-- .github/workflows/npm-publish.yml | 42 ------------------------------- 2 files changed, 7 insertions(+), 44 deletions(-) delete mode 100644 .github/workflows/npm-publish.yml diff --git a/.github/workflows/build.js.yml b/.github/workflows/build.js.yml index dd3b488..5b8dbb7 100644 --- a/.github/workflows/build.js.yml +++ b/.github/workflows/build.js.yml @@ -11,8 +11,9 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [14.x] - emsdk-version: [3.1.28] + node-version: [18.x] + emsdk-version: [3.1.41] + binaryen-version: [version_116_e] steps: - uses: actions/checkout@v3 with: @@ -29,8 +30,12 @@ jobs: - run: yarn run eslint src --ext ts,tsx --max-warnings 0 - run: yarn run eslint test --ext ts,tsx --max-warnings 0 - run: yarn run tsc --noemit + - run: cd native/sockdrive/js && yarn && yarn run webpack && cd ../../.. - run: git clone https://github.com/emscripten-core/emsdk.git - run: cd emsdk && ./emsdk install ${{ matrix.emsdk-version }} && ./emsdk activate ${{ matrix.emsdk-version }} && cd .. + - run: wget https://github.com/caiiiycuk/binaryen-fwasm-exceptions/releases/download/${{ matrix.binaryen-version }}/binaryen-${{ matrix.binaryen-version }}-x86_64-linux.tar.gz + - run: tar xfv binaryen-${{ matrix.binaryen-version }}-x86_64-linux.tar.gz + - run: cp -v binaryen-${{ matrix.binaryen-version }}/bin/wasm-opt ./emsdk/upstream/bin/wasm-opt - run: source ./emsdk/emsdk_env.sh && yarn run gulp - name: upload uses: actions/upload-artifact@v3.0.0 diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml deleted file mode 100644 index 9051705..0000000 --- a/.github/workflows/npm-publish.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: publish npm package - -on: - release: - types: [created] - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [14.x] - emsdk-version: [3.1.28] - steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - - name: build emulators - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - registry-url: https://registry.npmjs.org/ - - run: sudo apt-get -yqq update - - run: sudo apt-get install -yq --no-install-recommends cmake ninja-build - - run: npm install -g yarn - - run: yarn - - run: yarn run eslint src --ext ts,tsx --max-warnings 0 - - run: yarn run eslint test --ext ts,tsx --max-warnings 0 - - run: yarn run tsc --noEmit - - run: git clone https://github.com/emscripten-core/emsdk.git - - run: cd emsdk && ./emsdk install ${{ matrix.emsdk-version }} && ./emsdk activate ${{ matrix.emsdk-version }} && cd .. - - run: source ./emsdk/emsdk_env.sh && yarn run gulp - - run: npm publish --tag beta - env: - NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}} - - name: upload - uses: actions/upload-artifact@v3.0.0 - with: - name: 'dist' - path: 'dist'