Skip to content

Commit

Permalink
add ci/cd optimizations and switch to WarpBuild (#9054)
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 authored Mar 18, 2024
1 parent 91895eb commit 1f6f149
Show file tree
Hide file tree
Showing 15 changed files with 112 additions and 141 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/cd-dgraph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ on:
type: string
jobs:
dgraph-build-amd64:
runs-on: ubuntu-20.04
runs-on: warp-ubuntu-latest-x64-16x
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: '${{ github.event.inputs.releasetag }}'
- name: Get Go Version
Expand All @@ -23,7 +23,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: Install protobuf-compiler
Expand Down Expand Up @@ -100,9 +100,9 @@ jobs:
docker push dgraph/dgraph:${{ env.DGRAPH_RELEASE_VERSION }}-amd64
dgraph-build-arm64:
runs-on: [self-hosted, arm64]
runs-on: warp-ubuntu-latest-arm64-16x
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: '${{ github.event.inputs.releasetag }}'
- name: Get Go Version
Expand All @@ -111,7 +111,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: Install protobuf-compiler
Expand Down Expand Up @@ -189,9 +189,9 @@ jobs:
dgraph-docker-manifest:
needs: [dgraph-build-amd64, dgraph-build-arm64]
runs-on: ubuntu-20.04
runs-on: warp-ubuntu-latest-x64-16x
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: '${{ github.event.inputs.releasetag }}'
- name: Set Dgraph Release Version
Expand Down
16 changes: 5 additions & 11 deletions .github/workflows/ci-aqua-security-trivy-tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: ci-aqua-security-trivy-tests
on:
push:
pull_request:
paths-ignore:
- '.github/CODEOWNERS'
- '.vscode/**'
Expand All @@ -19,10 +19,6 @@ on:
- '**/**.jpg'
- '**/**.gif'
- '**/**.ini'
branches:
- main
- 'release/**'
pull_request:
types:
- opened
- reopened
Expand All @@ -31,23 +27,21 @@ on:
branches:
- main
- 'release/**'
schedule:
- cron: "0 0 * * *"
jobs:
build:
name: trivy-tests
if: github.event.pull_request.draft == false
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: Get Go Version
run: |
#!/bin/bash
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: Build Docker image
Expand All @@ -60,6 +54,6 @@ jobs:
format: 'sarif'
output: 'trivy-results.sarif'
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: 'trivy-results.sarif'
6 changes: 3 additions & 3 deletions .github/workflows/ci-dgraph-code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ on:
- 'release/**'
jobs:
dgraph-code-coverage:
runs-on: ubuntu-20.04-32gb
runs-on: warp-ubuntu-latest-x64-16x
steps:
- uses: actions/checkout@v3 # defaults to SHA of event that triggered workflow
- uses: actions/checkout@v4 # defaults to SHA of event that triggered workflow
- name: Get Go Version
run: |
#!/bin/bash
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 up Node
Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/ci-dgraph-fuzz.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
name: ci-dgraph-fuzz
on:
push:
branches:
- main
- 'release/**'
pull_request:
types:
- opened
Expand All @@ -13,21 +9,19 @@ on:
branches:
- main
- 'release/**'
schedule:
- cron: "0 0 * * *" # 1 run per day
jobs:
fuzz-test:
if: github.event.pull_request.draft == false
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: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOVERSION }}
- name: Run fuzz tests
Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/ci-dgraph-integration2-tests.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
name: ci-dgraph-integration2-tests
on:
push:
branches:
- main
- 'release/**'
pull_request:
types:
- opened
Expand All @@ -13,14 +9,12 @@ on:
branches:
- main
- 'release/**'
schedule:
- cron: "0 0 * * *" # 1 run per day
jobs:
dgraph-integration2-tests:
if: github.event.pull_request.draft == false
runs-on: ubuntu-20.04
runs-on: warp-ubuntu-latest-x64-4x
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get Go Version
Expand All @@ -29,7 +23,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: Make Linux Build and Docker Image
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci-dgraph-jepsen-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ env:
GOPATH: /home/ubuntu/go
jobs:
dgraph-jepsen-tests:
runs-on: [self-hosted, x64]
runs-on: warp-ubuntu-latest-x64-4x
steps:
- name: Checkout dgraph repo
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Checkout jepsen repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: dgraph-io/jepsen
path: jepsen
Expand All @@ -28,7 +28,7 @@ jobs:
JEPSEN_ROOT=$(pwd)
echo "JEPSEN_ROOT=$JEPSEN_ROOT" >> $GITHUB_ENV
- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOVERSION }}
- name: Make dgraph linux build
Expand Down
16 changes: 5 additions & 11 deletions .github/workflows/ci-dgraph-ldbc-tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: ci-dgraph-ldbc-tests
on:
push:
pull_request:
paths-ignore:
- '.github/CODEOWNERS'
- '.vscode/**'
Expand All @@ -19,10 +19,6 @@ on:
- '**/**.jpg'
- '**/**.gif'
- '**/**.ini'
branches:
- main
- 'release/**'
pull_request:
types:
- opened
- reopened
Expand All @@ -31,26 +27,24 @@ on:
branches:
- main
- 'release/**'
schedule:
- cron: "0 0 * * *" # 1-run per day
jobs:
dgraph-ldbc-tests:
if: github.event.pull_request.draft == false
runs-on: ubuntu-20.04
runs-on: warp-ubuntu-latest-x64-4x
steps:
- name: Checkout Dgraph
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: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOVERSION }}
- name: Set up Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
- name: Install protobuf-compiler
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci-dgraph-load-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,20 @@ on:
jobs:
dgraph-load-tests:
if: github.event.pull_request.draft == false
runs-on: buildjet-32vcpu-ubuntu-2004
runs-on: warp-ubuntu-latest-x64-16x
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: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOVERSION }}
- name: Set up Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
- name: Install protobuf-compiler
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/ci-dgraph-oss-build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: ci-dgraph-oss-build
on:
push:
pull_request:
paths-ignore:
- '.github/CODEOWNERS'
- '.vscode/**'
Expand All @@ -19,10 +19,6 @@ on:
- '**/**.jpg'
- '**/**.gif'
- '**/**.ini'
branches:
- main
- 'release/**'
pull_request:
types:
- opened
- reopened
Expand All @@ -31,21 +27,19 @@ on:
branches:
- main
- 'release/**'
schedule:
- cron: "0 0 * * *" # 1 run per day
jobs:
dgraph-oss-build:
if: github.event.pull_request.draft == false
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: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: ${{ env.GOVERSION }}
- name: Make OSS Linux Build
Expand Down
Loading

0 comments on commit 1f6f149

Please sign in to comment.