Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Sort out github actions #1561

Merged
merged 1 commit into from
Feb 10, 2023
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
4 changes: 4 additions & 0 deletions .github/scripts/dependency.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

sudo apt-get -y update
sudo apt-get install -y pkg-config libsystemd-dev libdbus-glib-1-dev libelf-dev libseccomp-dev
12 changes: 4 additions & 8 deletions .github/workflows/benchmark_execution_time.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@ jobs:
- name: Checkout to PR branch
uses: actions/checkout@v3

- name: Setup Linux env
run: |
sudo apt -y update
sudo apt install libsystemd-dev librust-libdbus-sys-dev libseccomp-dev
- name: Install requirements
run: ./.github/scripts/dependency.sh

- name: Setup Rust toolchain and cache
uses: actions-rust-lang/setup-rust-toolchain@v1.3.7
Expand All @@ -42,10 +40,8 @@ jobs:
with:
ref: main

- name: Setup Linux env
run: |
sudo apt -y update
sudo apt install libsystemd-dev librust-libdbus-sys-dev libseccomp-dev
- name: Install requirements
run: ./.github/scripts/dependency.sh

- name: Setup Rust toolchain and cache
uses: actions-rust-lang/setup-rust-toolchain@v1.3.7
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/containerd_integration_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
- uses: actions/checkout@v3
- name: Setup Rust toolchain and cache
uses: actions-rust-lang/setup-rust-toolchain@v1.3.7
- run: sudo apt-get -y update
- run: sudo apt-get install -y pkg-config libsystemd-dev libdbus-glib-1-dev libelf-dev libseccomp-dev
- name: Install requirements
run: ./.github/scripts/dependency.sh
- name: Build youki
run: make youki-release
- name: Upload youki binary
Expand All @@ -36,6 +36,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version: '1.18.3'
cache: true
- run: sudo apt-get -y update
- run: sudo apt-get install -y pkg-config libsystemd-dev libdbus-glib-1-dev libelf-dev libseccomp-dev btrfs-progs libbtrfs-dev
- name: Build containerd
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/integration_tests_validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ jobs:
- uses: actions/checkout@v3
- name: Setup Rust toolchain and cache
uses: actions-rust-lang/setup-rust-toolchain@v1.3.7
- run: sudo apt-get -y update
- run: sudo apt-get install -y pkg-config libsystemd-dev libdbus-glib-1-dev libelf-dev libseccomp-dev
- name: Install requirements
run: ./.github/scripts/dependency.sh
- name: Install runc 1.1.0
run: |
wget -q https://github.com/opencontainers/runc/releases/download/v1.1.0/runc.amd64
Expand Down
21 changes: 13 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
tests/rust-integration-tests/runtimetest: ./tests/rust-integration-tests/runtimetest
tests/rust-integration-tests/integration_test: ./tests/rust-integration-tests/integration_test
tests/rust-integration-tests/test_framework: ./tests/rust-integration-tests/test_framework

check:
needs: [changes]
if: ${{ !contains(needs.changes.outputs.dirs, '[]') }}
Expand All @@ -37,14 +38,16 @@ jobs:
- name: Setup Rust toolchain and cache
uses: actions-rust-lang/setup-rust-toolchain@v1.3.7
- run: rustup component add rustfmt clippy
- run: sudo apt-get -y update
- name: Install requirements
run: ./.github/scripts/dependency.sh
- run: sudo apt-get install -y pkg-config libsystemd-dev libdbus-glib-1-dev libelf-dev libseccomp-dev
- name: Check formatting
run: cargo fmt --all -- --check
working-directory: ${{matrix.dirs}}
- name: Check clippy lints
working-directory: ${{matrix.dirs}}
run: cargo clippy --all-targets --all-features -- -D warnings

tests:
runs-on: ubuntu-20.04
timeout-minutes: 15
Expand All @@ -58,6 +61,7 @@ jobs:
run: |
export LD_LIBRARY_PATH=$HOME/.wasmedge/lib
cd ./crates && cargo test --all --all-features --no-fail-fast

coverage:
runs-on: ubuntu-20.04
timeout-minutes: 15
Expand All @@ -72,10 +76,8 @@ jobs:
uses: taiki-e/install-action@v1
with:
tool: cargo-llvm-cov@0.4.0
- name: Update System Libraries
run: sudo apt-get -y update
- name: Install System Libraries
run: sudo apt-get install -y pkg-config libsystemd-dev libdbus-glib-1-dev libelf-dev libseccomp-dev
- name: Install requirements
run: ./.github/scripts/dependency.sh
- name: Run Test Coverage for youki
run: |
cargo llvm-cov clean --workspace
Expand All @@ -85,6 +87,7 @@ jobs:
uses: codecov/codecov-action@v2
with:
file: ./coverage.lcov

integration_tests:
runs-on: ubuntu-20.04
timeout-minutes: 15
Expand All @@ -94,11 +97,13 @@ jobs:
submodules: recursive
- name: Setup Rust toolchain and cache
uses: actions-rust-lang/setup-rust-toolchain@v1.3.7
- run: sudo apt-get -y update
- run: sudo apt-get install -y pkg-config libsystemd-dev libdbus-glib-1-dev libelf-dev libseccomp-dev
- uses: actions/setup-go@v2
- name: Install requirements
run: ./.github/scripts/dependency.sh
- uses: actions/setup-go@v3
with:
go-version: "1.17.6"
cache: true
cache-dependency-path: tests/oci-runtime-tests/src/github.com/opencontainers/runtime-tools/go.sum
- name: Build
run: make youki-release
- name: Run integration tests
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/podman_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- run: sudo apt-get -y update
- run: sudo apt-get install -y pkg-config libsystemd-dev libdbus-glib-1-dev libelf-dev libseccomp-dev libgpgme-dev bats
- name: Install requirements
run: ./.github/scripts/dependency.sh
- run: make youki-dev
- run: sudo cp youki /usr/local/bin
- name: Clone podman repository
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: recursive
- run: sudo apt-get -y update
- run: sudo apt-get install -y pkg-config libsystemd-dev libdbus-glib-1-dev libelf-dev libseccomp-dev libclang-dev
- name: Install requirements
run: ./.github/scripts/dependency.sh
- name: Set up cargo
- name: Setup Rust toolchain and cache
uses: actions-rust-lang/setup-rust-toolchain@v1.3.7
Expand All @@ -28,8 +28,8 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- run: sudo apt-get -y update
- run: sudo apt-get install -y pkg-config libsystemd-dev libdbus-glib-1-dev libelf-dev libseccomp-dev
- name: Install requirements
run: ./.github/scripts/dependency.sh
- name: Set up cargo
- name: Setup Rust toolchain and cache
uses: actions-rust-lang/setup-rust-toolchain@v1.3.7
Expand Down