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

running the build artifacts step in parallel #49

Merged
merged 6 commits into from
Aug 22, 2023
Merged
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
44 changes: 33 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Test SBOM generation
run: snyk sbom --file=./node-runner-cli/Pipfile --org=${{ env.SNYK_NETWORK_ORG_ID }} --format=cyclonedx1.4+json --json-file-output sbom.json
package_ubuntu_cli:
name: "Package cli for Ubuntu"
tests:
name: "Unit tests"
runs-on: ubuntu-22.04
steps:
- name: cancel running workflows
Expand Down Expand Up @@ -100,6 +100,17 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build-jammy:
needs:
- tests
name: "Build jammy"
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3.4.0
with:
fetch-depth: 0
- name: Build the binary for ubuntu jammy
run: |
cd node-runner-cli
Expand All @@ -111,6 +122,17 @@ jobs:
with:
name: ubuntu 22.04
path: "${{ github.workspace }}/node-runner-cli/out/ubuntu/jammy/babylonnode"

build-focal:
needs:
- tests
name: "Build focal"
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3.4.0
with:
fetch-depth: 0
- name: Build the binary for ubuntu focal
run: |
cd node-runner-cli
Expand All @@ -122,13 +144,12 @@ jobs:
with:
name: ubuntu 20.04
path: "${{ github.workspace }}/node-runner-cli/out/ubuntu/focal/babylonnode"

upload-asset-store:
environment: AWS_ARTIFACT
runs-on: ubuntu-22.04
if: ${{ github.event_name == 'push' }}
needs:
- package_ubuntu_cli
- build-jammy
- snyk-scan
permissions:
id-token: write
Expand Down Expand Up @@ -168,7 +189,7 @@ jobs:
runs-on: ubuntu-22.04
if: ${{ github.event_name == 'release' }}
needs:
- package_ubuntu_cli
- build-jammy
- snyk-scan
steps:
- name: Download packaged cli
Expand All @@ -191,7 +212,7 @@ jobs:
if: ${{ github.event_name == 'release' }}
permissions: write-all
needs:
- package_ubuntu_cli
- build-jammy
- snyk-scan
steps:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
Expand Down Expand Up @@ -232,7 +253,7 @@ jobs:
runs-on: ubuntu-20.04
if: ${{ github.event_name == 'release' }}
needs:
- package_ubuntu_cli
- build-focal
- snyk-scan
steps:
- name: Download packaged cli
Expand All @@ -253,7 +274,7 @@ jobs:
test-systemd:
runs-on: [node-only]
needs:
- package_ubuntu_cli
- build-jammy
- snyk-scan
steps:
- name: Checkout
Expand Down Expand Up @@ -330,7 +351,7 @@ jobs:
test-config-command:
runs-on: ubuntu-22.04
needs:
- package_ubuntu_cli
- build-jammy
- snyk-scan
steps:
- name: Checkout
Expand Down Expand Up @@ -419,7 +440,7 @@ jobs:
pull-requests: read
contents: read
needs:
- package_ubuntu_cli
- build-jammy
- snyk-scan
steps:
- name: Checkout
Expand Down Expand Up @@ -487,7 +508,8 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'release' }}
needs:
- package_ubuntu_cli
- build-jammy
- build-focal
- snyk-scan
permissions:
id-token: write
Expand Down