Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hosting Augur Turbo's simplified package on Crust network #1222

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/cd-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,22 @@ jobs:
yarn subgraph prepare:matic
yarn subgraph codegen
yarn subgraph deploy:matic --access-token ${{ secrets.GRAPH_TOKEN }}

- name: Pin to IPFS
id: upload
uses: crustio/[email protected]
with:
path: './packages/simplified/build'
seeds: ${{ secrets.CRUST_SEEDS }}

- name: Pin to Crust
uses: crustio/[email protected]
continue-on-error: true
timeout-minutes: 2
with:
cid: ${{ steps.upload.outputs.hash }}
seeds: ${{ secrets.CRUST_SEEDS }}

- name: Compress action step
uses: master-atul/[email protected]
id: compress
Expand Down
84 changes: 84 additions & 0 deletions .github/workflows/test-crust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Test Crust

on: # push
workflow_dispatch:

jobs:
build:
# if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- run: yarn
- run: VERSION=$(node -e "console.log(require('./lerna.json').version)") yarn build
- run: VERSION=$(node -e "console.log(require('./lerna.json').version)") NODE_OPTIONS="--max_old_space_size=6144" DEFAULT_NETWORK_ID="137" HIDE_FAUCET="true" yarn simp build
- run: yarn smart generate:environments
- name: Verify Changed files
uses: tj-actions/[email protected]
id: verify-changed-files
with:
files: |
packages/smart/environments/matic.json
packages/smart/addresses.ts
# - name: Redeploy the subgraph when the environment changes
# if: steps.verify-changed-files.outputs.files_changed == 'true'
# run: |
# yarn subgraph prepare:abis
# yarn subgraph prepare:matic
# yarn subgraph codegen
# yarn subgraph deploy:matic --access-token ${{ secrets.GRAPH_TOKEN }}

- name: Pin to IPFS
id: upload
uses: crustio/[email protected]
with:
path: './packages/simplified/build'
seeds: ${{ secrets.CRUST_SEEDS }}

- run: echo ${{ steps.upload.outputs.hash }}

- name: Pin to Crust
uses: crustio/[email protected]
continue-on-error: true
timeout-minutes: 2
with:
cid: ${{ steps.upload.outputs.hash }}
seeds: ${{ secrets.CRUST_SEEDS }}

# - name: Compress action step
# uses: master-atul/[email protected]
# id: compress
# with:
# command: c
# cwd: ./packages/simplified/
# files: |
# ./build
# outPath: release.tar.gz
# - name: Release
# uses: softprops/action-gh-release@v1
# with:
# draft: true
# files: |
# LICENSE
# release.tar.gz
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}