Skip to content

Commit

Permalink
ci/cd optimization (#2051)
Browse files Browse the repository at this point in the history
• updating Actions versions
• adding WarpBuild runners for execution without concurrency limits
• tuning triggers/schedules
  • Loading branch information
ryanfoxtyler committed May 3, 2024
1 parent fece30f commit a09e983
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 56 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/cd-badger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ on:
type: string
jobs:
badger-build-amd64:
runs-on: ubuntu-20.04
runs-on: warp-ubuntu-latest-x64-4x
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: '${{ github.event.inputs.releasetag }}'
- name: Get Go Version
Expand All @@ -19,7 +19,7 @@ jobs:
GOVERSION=$({ [ -f .go-version ] && cat .go-version; })
echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV
- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOVERSION }}
- name: Set Badger Release Version
Expand Down Expand Up @@ -51,9 +51,9 @@ jobs:
badger/badger-checksum-linux-amd64.sha256
badger/badger-linux-amd64.tar.gz
badger-build-arm64:
runs-on: [self-hosted, ARM64]
runs-on: warp-ubuntu-latest-arm64-4x
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: '${{ github.event.inputs.releasetag }}'
- name: Get Go Version
Expand All @@ -62,7 +62,7 @@ jobs:
GOVERSION=$({ [ -f .go-version ] && cat .go-version; })
echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV
- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOVERSION }}
- name: Set Badger Release Version
Expand Down
11 changes: 3 additions & 8 deletions .github/workflows/ci-aqua-security-trivy-tests.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
name: ci-aqua-security-trivy-tests
on:
push:
branches:
- main
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
branches:
- main
schedule:
- cron: "1 0 * * *"
- main
jobs:
build:
name: trivy-tests
runs-on: ubuntu-20.04
runs-on: warp-ubuntu-latest-x64-4x
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci-badger-bank-tests-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ on:
- cron: "1 3 * * *"
jobs:
badger-bank:
runs-on: ubuntu-20.04
runs-on: warp-ubuntu-latest-x64-4x
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Get Go Version
run: |
#!/bin/bash
GOVERSION=$({ [ -f .go-version ] && cat .go-version; })
echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV
- name: Setup Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOVERSION }}
- name: Install Dependencies
Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/ci-badger-bank-tests.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,21 @@
name: ci-badger-bank-tests
on:
push:
branches:
- main
- 'release/v*'
pull_request:
branches:
- main
- 'release/v*'
schedule:
- cron: "1 0 * * *"
jobs:
badger-bank:
runs-on: ubuntu-20.04
runs-on: warp-ubuntu-latest-x64-4x
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Get Go Version
run: |
#!/bin/bash
GOVERSION=$({ [ -f .go-version ] && cat .go-version; })
echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV
- name: Setup Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOVERSION }}
- name: Install Dependencies
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci-badger-tests-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ on:
- 'release/v*'
jobs:
badger-tests-coverage:
runs-on: ubuntu-20.04
runs-on: warp-ubuntu-latest-x64-4x
steps:
- uses: actions/checkout@v3 # checkout merge commit
- uses: actions/checkout@v4 # checkout merge commit
with:
ref: "refs/pull/${{ github.event.number }}/merge"
- name: Get Go Version
Expand All @@ -17,7 +17,7 @@ jobs:
GOVERSION=$({ [ -f .go-version ] && cat .go-version; })
echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV
- name: Setup Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOVERSION }}
- name: Install Dependencies
Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/ci-badger-tests.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,21 @@
name: ci-badger-tests
on:
push:
branches:
- main
- 'release/v*'
pull_request:
branches:
- main
- 'release/v*'
schedule:
- cron: "1 0 * * *"
jobs:
badger-tests:
runs-on: ubuntu-20.04
runs-on: warp-ubuntu-latest-x64-4x
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Get Go Version
run: |
#!/bin/bash
GOVERSION=$({ [ -f .go-version ] && cat .go-version; })
echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV
- name: Setup Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOVERSION }}
- name: Install Dependencies
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci-dgraph-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ on:
- main
jobs:
dgraph-tests:
runs-on: ubuntu-20.04-32gb
runs-on: warp-ubuntu-latest-x64-16x
steps:
- name: Checkout Dgraph repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: dgraph-io/dgraph
ref: main
Expand All @@ -18,14 +18,14 @@ jobs:
GOVERSION=$({ [ -f .go-version ] && cat .go-version; })
echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV
- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOVERSION }}
- name: Fetch latest Badger version
run: |
go get github.com/dgraph-io/badger/v4@main
- name: Set up Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
- name: Install protobuf-compiler
Expand Down
21 changes: 7 additions & 14 deletions .github/workflows/ci-golang-lint.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,30 @@
name: ci-golang-lint
on:
push:
branches:
- main
- 'release/v*'
pull_request:
branches:
- main
- 'release/v*'
schedule:
- cron: "1 0 * * *"
jobs:
go-lint:
name: lint
runs-on: ubuntu-20.04
runs-on: warp-ubuntu-latest-x64-4x
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Get Go Version
run: |
#!/bin/bash
GOVERSION=$({ [ -f .go-version ] && cat .go-version; })
echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV
- name: Setup Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOVERSION }}
- name: golang-lint
env:
# prevent OOM
GOGC: 10
uses: golangci/golangci-lint-action@v3.2.0
uses: golangci/golangci-lint-action@v4
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.48
version: latest
only-new-issues: true
args: --timeout=10m
skip-pkg-cache: true
skip-build-cache: true

0 comments on commit a09e983

Please sign in to comment.