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

Refactor CI env variables #216

Merged
merged 2 commits into from
Apr 19, 2021
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 5 additions & 14 deletions .github/workflows/cri_minio_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
env:
GOOS: linux
GO111MODULE: on
TMPDIR: /root/tmp/
GOCACHE: /root/tmp/gocache
GOPATH: /root/tmp/gopath
GOROOT: $HOME/go

jobs:
minio-test:
Expand All @@ -16,13 +20,9 @@ jobs:

steps:
- name: Setup TMPDIR
run: mkdir -p $HOME/tmp
run: mkdir -p $TMPDIR

- name: Set up Go 1.15
env:
GOROOT: $HOME/go
GOCACHE: /root/tmp/gocache
GOPATH: /root/tmp/gopath
uses: actions/setup-go@v2
with:
go-version: 1.15
Expand All @@ -34,24 +34,15 @@ jobs:
run: ./scripts/setup_firecracker_containerd.sh

- name: Build
env:
GOCACHE: /root/tmp/gocache
GOPATH: /root/tmp/gopath
run: go build

- name: Start vHive cluster
run: ./scripts/cloudlab/start_onenode_vhive_cluster.sh

- name: modify $PATH
env:
GOCACHE: /root/tmp/gocache
GOPATH: /root/tmp/gopath
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH

- name: Setup minio
env:
GOCACHE: /root/tmp/gocache
GOPATH: /root/tmp/gopath
run: sleep 1m && make -C ./function-images/tests/save_load_minio local

- name: Test minio
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/cri_stock_containerd_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
env:
GOOS: linux
GO111MODULE: on
TMPDIR: /root/tmp/

jobs:
stock-containerd-test:
Expand All @@ -16,7 +17,7 @@ jobs:

steps:
- name: Setup TMPDIR
run: mkdir -p $HOME/tmp
run: mkdir -p $TMPDIR

- name: Check out code into the Go module directory
uses: actions/checkout@v2
Expand Down
23 changes: 7 additions & 16 deletions .github/workflows/cri_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,29 @@ on:
env:
GOOS: linux
GO111MODULE: on
TMPDIR: /root/tmp/
GOCACHE: /root/tmp/gocache
GOPATH: /root/tmp/gopath

jobs:
cri-tests:
name: CRI tests
env:
GITHUB_RUN_ID: ${{ github.run_id }}
GITHUB_VHIVE_ARGS: "-dbg"
runs-on: [self-hosted, cri]

steps:

- name: Host Info
env:
GITHUB_RUN_ID: ${{ github.run_id }}
run: |
echo $HOSTNAME
echo $GITHUB_RUN_ID

- name: Setup TMPDIR
run: mkdir -p $HOME/tmp
run: mkdir -p $TMPDIR

- name: Set up Go 1.15
env:
GOROOT: $HOME/go
GOCACHE: /root/tmp/gocache
GOPATH: /root/tmp/gopath
uses: actions/setup-go@v2
with:
go-version: 1.15
Expand All @@ -50,18 +50,9 @@ jobs:
run: ./scripts/setup_firecracker_containerd.sh

- name: Build
env:
GOCACHE: /root/tmp/gocache
GOPATH: /root/tmp/gopath
run: go build

- name: Run vHive CRI tests
env:
TMPDIR: /root/tmp/
GOCACHE: /root/tmp/gocache
GOPATH: /root/tmp/gopath
GITHUB_RUN_ID: ${{ github.run_id }}
GITHUB_VHIVE_ARGS: "-dbg"
run: make test-cri

- name: Archive log artifacts
Expand Down
35 changes: 16 additions & 19 deletions .github/workflows/nightly_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,19 @@ on:
env:
GOOS: linux
GO111MODULE: on
TMPDIR: /root/tmp/
GOCACHE: /root/tmp/gocache
GOPATH: /root/tmp/gopath
GOROOT: $HOME/go

jobs:
integration-tests:
name: Test all functions
runs-on: [self-hosted, nightly, integ]
steps:
- name: Setup TMPDIR
run: mkdir -p $TMPDIR

- name: Set up Go 1.15
uses: actions/setup-go@v2
with:
Expand Down Expand Up @@ -50,24 +57,23 @@ jobs:
fail-fast: false
matrix:
vhive_args: ["-dbg", "-dbg -snapshots", "-dbg -snapshots -upf"]
env:
GITHUB_RUN_ID: ${{ github.run_id }}
GITHUB_JOB: ${{ github.job }}
GITHUB_VHIVE_ARGS: ${{ matrix.vhive_args }}

steps:

- name: Host Info
env:
GITHUB_RUN_ID: ${{ github.run_id }}
run: |
echo $HOSTNAME
echo $GITHUB_RUN_ID
echo HOSTNAME=$HOSTNAME
echo GITHUB_RUN_ID=$GITHUB_RUN_ID
echo GITHUB_JOB=$GITHUB_JOB

- name: Setup TMPDIR
run: mkdir -p $HOME/tmp
run: mkdir -p $TMPDIR

- name: Set up Go 1.15
env:
GOROOT: $HOME/go
GOCACHE: /root/tmp/gocache
GOPATH: /root/tmp/gopath
uses: actions/setup-go@v2
with:
go-version: 1.15
Expand All @@ -79,18 +85,9 @@ jobs:
run: ./scripts/setup_firecracker_containerd.sh

- name: Build
env:
GOCACHE: /root/tmp/gocache
GOPATH: /root/tmp/gopath
run: go build

- name: Run vHive CRI tests
env:
TMPDIR: /root/tmp/
GOCACHE: /root/tmp/gocache
GOPATH: /root/tmp/gopath
GITHUB_RUN_ID: ${{ github.run_id }}
GITHUB_VHIVE_ARGS: $${{ matrix.vhive_args }}
run: |
echo vHive args are $GITHUB_VHIVE_ARGS
make test-cri
Expand All @@ -99,7 +96,7 @@ jobs:
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: ctrd-logs
name: ${{ github.job }}-${{ matrix.vhive_args }}-ctrd-logs
shyamjesal marked this conversation as resolved.
Show resolved Hide resolved
path: |
/tmp/ctrd-logs/${{ github.run_id }}

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[![build](https://github.com/ease-lab/vhive/workflows/vHive%20build%20tests/badge.svg)](https://github.com/ease-lab/vhive/actions)
[![Unit Tests](https://github.com/ease-lab/vhive/workflows/vHive%20unit%20tests/badge.svg)](https://github.com/ease-lab/vhive/actions)
[![Integration Tests](https://github.com/ease-lab/vhive/workflows/vHive%20integration%20tests/badge.svg)](https://github.com/ease-lab/vhive/actions)
[![Nightly Tests](https://github.com/ease-lab/vhive/workflows/vHive%20nightly%20integration%20tests/badge.svg)](https://github.com/ease-lab/vhive/actions)
[![vHive CRI tests](https://github.com/ease-lab/vhive/actions/workflows/cri_test.yml/badge.svg)](https://github.com/ease-lab/vhive/actions/workflows/cri_test.yml)
[![Go Report Card](https://goreportcard.com/badge/github.com/ease-lab/vhive)](https://goreportcard.com/report/github.com/ease-lab/vhive)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Expand Down