Toolchain Management #195
Workflow file for this run
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
name: CI | |
on: | |
push: | |
branches: | |
- main | |
- master | |
pull_request: | |
jobs: | |
build: | |
strategy: | |
max-parallel: 2 | |
matrix: | |
moc-version: [0.10.0] | |
mops-version: [./cli, ic-mops@latest, [email protected]] | |
node-version: [20] | |
runs-on: ubuntu-latest | |
name: node ${{ matrix.node-version }}, moc ${{ matrix.moc-version }}, ${{ matrix.mops-version }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- uses: dfinity/setup-dfx@main | |
with: | |
dfx-version: 0.15.1 | |
- name: Cache mops packages | |
uses: actions/cache@v3 | |
with: | |
key: mops-packages-${{ hashFiles('mops.toml') }} | |
restore-keys: | | |
mops-packages-${{ hashFiles('mops.toml') }} | |
mops-packages- | |
path: | | |
~/.cache/mops | |
- name: Select moc version | |
run: npx mocv use ${{ matrix.moc-version }} | |
- name: Install npm packages | |
run: npm install | |
- name: Build local cli | |
if: ${{ matrix.mops-version == './cli' }} | |
run: cd cli && npm run prepare | |
- name: Install mops | |
run: npm i -g ${{ matrix.mops-version }} | |
- name: Install mocv | |
run: npm i -g mocv | |
- name: Install mops packages | |
run: mops install | |
- name: Build and Deploy | |
run: | | |
npm run replica | |
npm run deploy-local | |
npm run build |