Skip to content

Commit

Permalink
split PR and merge workflows, upload only on merge (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
ravyu-jump authored Sep 3, 2024
1 parent 4aa2af4 commit 82d0b4d
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/build.yml → .github/workflows/build-common.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
name: "Build, check, test, release"
name: "Build, check, test, release common"
on:
push:
branches:
- 'agave-v2.0'
pull_request:
workflow_call:
inputs:
upload_artifacts:
required: true
type: boolean
default: false
description: "Upload artifacts to GitHub for consumption by fuzzcorp"


jobs:
test:
Expand Down Expand Up @@ -42,12 +46,14 @@ jobs:
./scripts/run_test_vectors.sh
- uses: actions/upload-artifact@v4
if: ${{ inputs.upload_artifacts }}
with:
name: libsolfuzz-agave.so
path: ./target/x86_64-unknown-linux-gnu/release/libsolfuzz_agave.so

- name: Upload stubbed so
uses: actions/upload-artifact@v4
if: ${{ inputs.upload_artifacts }}
with:
name: libsolfuzz-agave-stubbed.so
path: ./target/x86_64-unknown-linux-gnu/release/libsolfuzz_agave_stubbed.so
12 changes: 12 additions & 0 deletions .github/workflows/build-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: "Build, check, test, release"
on:
push:
branches:
- 'agave-v2.0'
pull_request:

jobs:
build:
uses: ./.github/workflows/build-common.yml
with:
upload_artifacts: true
9 changes: 9 additions & 0 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: "Build, check, test"
on:
pull_request:

jobs:
build:
uses: ./.github/workflows/build-common.yml
with:
upload_artifacts: false

0 comments on commit 82d0b4d

Please sign in to comment.