@@ -45,45 +45,52 @@ jobs:
4545 ref : ${{ needs.Rebuild-Required.outputs.branch }}
4646 fetch-depth : 0
4747
48+ - name : Read .nvmrc
49+ run : echo ::set-output name=NVMRC::$(cat .nvmrc)
50+ id : nvm
51+
52+ - name : Setup Node.js
53+ uses : actions/setup-node@master
54+ with :
55+ node-version : ' ${{ steps.nvm.outputs.NVMRC }}'
56+
57+ - name : Install dependencies
58+ run : (yarn install --nonInteractive --frozen-lockfile --prefer-offline || yarn install --nonInteractive --frozen-lockfile --prefer-offline)
59+
60+ - name : Set environment variable
61+ run : echo POLYWRAP_CLI_PATH=$(pwd)/node_modules/polywrap >> $GITHUB_ENV
62+
4863 - name : Checkout Repository
4964 uses : actions/checkout@v2
5065 with :
5166 path : toolchain
52- fetch-depth : 0
5367
5468 - name : Read .nvmrc
5569 run : echo ::set-output name=NVMRC::$(cat .nvmrc)
56- id : nvm
70+ id : nvm-toolchain
5771 working-directory : ./toolchain
5872
5973 - name : Setup Node.js
6074 uses : actions/setup-node@master
6175 with :
62- node-version : ' ${{ steps.nvm.outputs.NVMRC }}'
63-
64- - name : Get yarn cache directory path
65- id : yarn-cache-dir-path
66- run : echo "::set-output name=dir::$(yarn cache dir)"
67-
68- - uses : actions/cache@v2
69- with :
70- path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
71- key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
72- restore-keys : |
73- ${{ runner.os }}-yarn-
76+ node-version : ' ${{ steps.nvm-toolchain.outputs.NVMRC }}'
7477
7578 - name : Install dependencies
7679 run : (yarn install --nonInteractive --frozen-lockfile --prefer-offline || yarn install --nonInteractive --frozen-lockfile --prefer-offline)
7780 working-directory : ./toolchain
7881
79- - name : Install polywrap CLI
80- run : yarn install polywrap@0.11.0-pre.4
81- working-directory : ./toolchain
82-
8382 - name : Build toolchain
8483 run : yarn build
8584 working-directory : ./toolchain
8685
86+ - name : Check if exists
87+ run : cat ./packages/wasm/build/index.js
88+ working-directory : ./toolchain
89+
90+ - name : Set environment variable
91+ run : echo POLYWRAP_WASM_PATH=$(pwd)/packages/wasm >> $GITHUB_ENV
92+ working-directory : ./toolchain
93+
8794 - name : Install Rust
8895 uses : actions-rs/toolchain@v1
8996 with :
@@ -101,12 +108,6 @@ jobs:
101108 restore-keys : |
102109 cargo-${{ runner.os }}-${{ github.job }}
103110
104- - name : Set environment variable
105- run : echo POLYWRAP_CLI_PATH=$(pwd)/node_modules/polywrap >> $GITHUB_ENV
106-
107- - name : Set environment variable
108- run : echo POLYWRAP_WASM_PATH=$(pwd)/toolchain/packages/wasm >> $GITHUB_ENV
109-
110111 - name : Modify permissions of cargo registry
111112 run : sudo chown -R runner:runner ${HOME}/.cargo/registry
112113
0 commit comments