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

ci/cd optimization #2051

Merged
merged 8 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/cd-badger.yml
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
@@ -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
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
@@ -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
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
@@ -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
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
@@ -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