Skip to content

Commit

Permalink
Test CI job
Browse files Browse the repository at this point in the history
  • Loading branch information
sds committed Nov 22, 2024
1 parent 5d23a33 commit 4a5d4cf
Showing 1 changed file with 42 additions and 20 deletions.
62 changes: 42 additions & 20 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,49 +4,71 @@ on:
pull_request:
branches: [main]
workflow_call:
inputs:
malachite_git_ref:
required: true
type: string
default: "8a9f3702eb41199bc8a7f45139adba233a04744a"
secrets:
MALACHITE_PRIVATE_REPO_SSH_KEY:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
MALACHITE_GIT_REF: "8a9f3702eb41199bc8a7f45139adba233a04744a"

jobs:
test:
timeout-minutes: 5
timeout-minutes: 20
runs-on: ubuntu-latest
steps:
- name: Install Protoc
uses: arduino/setup-protoc@v3

- uses: actions/cache/restore@v4
id: malachite-cache
with:
path: malachite
key: ${{ runner.os }}-${{ runner.arch }}-${{ inputs.malachite_git_ref }}
path: ./malachite
key: ${{ runner.os }}-${{ runner.arch }}-${{ env.MALACHITE_GIT_REF }}
- if: ${{ steps.malachite-cache.outputs.cache-hit != 'true' }}
uses: actions/checkout@v4
with:
repository: farcasterxyz/malachite
ref: ${{ inputs.malachite_git_ref }}
path: malachite
ref: ${{ env.MALACHITE_GIT_REF }}
path: ./malachite
ssh-key: ${{ secrets.MALACHITE_PRIVATE_REPO_SSH_KEY }}
- if: ${{ steps.malachite-cache.outputs.cache-hit != 'true' }}
working-directory: malachite/code
working-directory: ./malachite/code
run: cargo build
- if: ${{ steps.malachite-cache.outputs.cache-hit != 'true' }}
uses: actions/cache/save@v4
id: malachite-cache
with:
path: malachite
key: ${{ runner.os }}-${{ runner.arch }}-${{ inputs.malachite_git_ref }}
path: ./malachite
key: ${{ runner.os }}-${{ runner.arch }}-${{ env.MALACHITE_GIT_REF }}

- uses: actions/cache/restore@v4
with:
path: ./.cargo
key: ${{ runner.os }}-${{ runner.arch }}-cargo
- uses: actions/cache/restore@v4
id: snapchain-cache
with:
path: ./snapchain
key: ${{ runner.os }}-${{ runner.arch }}-snapchain
- uses: actions/checkout@v4
with:
path: snapchain
- working-directory: snapchain
run: cargo build
- working-directory: snapchain
path: ./snapchain
- working-directory: ./snapchain
run: cargo build --locked
- uses: actions/cache/save@v4
with:
path: ./snapchain
key: ${{ runner.os }}-${{ runner.arch }}-snapchain
- working-directory: ./snapchain
run: cargo test
- working-directory: snapchain
- uses: actions/cache/save@v4
with:
path: ./.cargo
key: ${{ runner.os }}-${{ runner.arch }}-cargo
- working-directory: ./snapchain
run: cargo fmt --all --check

0 comments on commit 4a5d4cf

Please sign in to comment.