Skip to content

Commit

Permalink
ci: Use Makefile for the correct build order.
Browse files Browse the repository at this point in the history
  • Loading branch information
kovipu committed Sep 3, 2024
1 parent 708e624 commit e110ea3
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 33 deletions.
24 changes: 15 additions & 9 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,39 @@ jobs:
steps:
- name: Checkout your repository using git
uses: actions/checkout@v4

- name: Read .nvmrc
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
id: nvm

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable

- name: Rust cache
uses: Swatinem/rust-cache@v2

- name: Install Stellar
run: |
cargo install --locked stellar-cli --features opt
run: cargo install --locked stellar-cli --features opt

- name: Build contracts
run: make build

- name: Setup env
run: cp .env.example .env
- name: Build Reflector
run: |
cd contracts/reflector
soroban contract build
cd ../..

- name: Install and build
run: |
npm install
npm run init
- name: Install, build, and upload your site output
uses: withastro/action@v2

Expand All @@ -57,4 +63,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v4
23 changes: 17 additions & 6 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3

- name: Read .nvmrc
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
id: nvm

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 22.6.0
cache: 'npm'
- run: npm ci
- run: npm run lint:check
- run: npm run format:check
node-version: '${{ steps.nvm.outputs.NVMRC }}'

- name: Install dependencies
run: npm ci

- name: Biome lint check
run: npm run lint:check

- name: Prettier format check
run: npm run format:check
21 changes: 3 additions & 18 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,11 @@ jobs:
profile: minimal
toolchain: stable

- name: Build Reflector
run: |
cd contracts/reflector
cargo build --release --target wasm32-unknown-unknown
cd ../..
- name: Build mock Reflector
run: |
cd contracts/reflector_mock
cargo build --release --target wasm32-unknown-unknown
cd ../..
- name: Build Loan pool contract
run: |
cd contracts/loan_pool
cargo build --release --target wasm32-unknown-unknown
cd ../..
- name: Rust cache
uses: Swatinem/rust-cache@v2

- name: Build
run: cargo build --release --target wasm32-unknown-unknown
run: make build

- name: Run tests
run: cargo test --verbose
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
build:
cargo build --release --target wasm32-unknown-unknown -p reflector-oracle-mock
cargo build --release --target wasm32-unknown-unknown -p reflector-oracle
cargo build --release --target wasm32-unknown-unknown -p loan_pool
cargo build --release --target wasm32-unknown-unknown -p loan_manager
cargo build --release --target wasm32-unknown-unknown -p factory

0 comments on commit e110ea3

Please sign in to comment.