Skip to content

Commit

Permalink
fixup! ci: build devnet image
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelstanley committed Dec 19, 2023
1 parent c422dff commit 3f00bcf
Showing 1 changed file with 48 additions and 53 deletions.
101 changes: 48 additions & 53 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ on:
- v*
branches:
- main
workflow_run:
workflows: ["Build devnet"]
types:
- completed

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -35,60 +31,59 @@ jobs:
with:
submodules: recursive

- name: 📦 Install protoc
run: sudo apt update && sudo apt install -y protobuf-compiler libprotobuf-dev

- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
offchain/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-

- name: Install cargo sweep
run: cargo install cargo-sweep
continue-on-error: true

- name: Install cargo cache
run: cargo install cargo-cache
continue-on-error: true

- name: Set sweep timestamp
run: cargo sweep -s

- name: Build binaries and tests
run: cargo build --all-targets

- name: Clean old build files
run: cargo sweep -f

- name: Clean dependencies source files
run: cargo cache --autoclean

- name: Run tests
run: cargo test

- name: Generate GraphQL schema
run: ./target/debug/generate-schema

- name: Upload GraphQL schema
uses: actions/upload-artifact@v3
with:
name: graphql-schema
path: offchain/schema.graphql
if-no-files-found: error
# - name: 📦 Install protoc
# run: sudo apt update && sudo apt install -y protobuf-compiler libprotobuf-dev
#
# - uses: actions/cache@v3
# with:
# path: |
# ~/.cargo/bin/
# ~/.cargo/registry/index/
# ~/.cargo/registry/cache/
# ~/.cargo/git/db/
# offchain/target/
# key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
# restore-keys: ${{ runner.os }}-cargo-
#
# - name: Install cargo sweep
# run: cargo install cargo-sweep
# continue-on-error: true
#
# - name: Install cargo cache
# run: cargo install cargo-cache
# continue-on-error: true
#
# - name: Set sweep timestamp
# run: cargo sweep -s
#
# - name: Build binaries and tests
# run: cargo build --all-targets
#
# - name: Clean old build files
# run: cargo sweep -f
#
# - name: Clean dependencies source files
# run: cargo cache --autoclean
#
# - name: Run tests
# run: cargo test
#
# - name: Generate GraphQL schema
# run: ./target/debug/generate-schema
#
# - name: Upload GraphQL schema
# uses: actions/upload-artifact@v3
# with:
# name: graphql-schema
# path: offchain/schema.graphql
# if-no-files-found: error

- name: Docker meta
id: docker_meta
uses: docker/metadata-action@v5
with:
images: cartesi/rollups-devnet
tags: |
type=raw,value=devel
tags: type=raw,value=devel

- name: Login to Docker Hub
uses: docker/login-action@v3
Expand All @@ -105,7 +100,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- uses: depot/setup-action@v1
- name: Build and push docker image
- name: Build devnet
id: docker_build
uses: depot/bake-action@v1
with:
Expand Down

0 comments on commit 3f00bcf

Please sign in to comment.