From 27062c01f1b94cc1fe3e6d8fd1f6cae6906dd222 Mon Sep 17 00:00:00 2001 From: James Sturtevant Date: Wed, 16 Aug 2023 23:12:20 +0000 Subject: [PATCH] Consolidate setup steps to keep in sync Signed-off-by: James Sturtevant --- .github/workflows/ci.yml | 16 ++++++++-------- README.md | 12 +++--------- .github/scripts/build.sh => scripts/setup.sh | 2 +- 3 files changed, 12 insertions(+), 18 deletions(-) rename .github/scripts/build.sh => scripts/setup.sh (62%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e32e911cd..2a5b0a867 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,8 +17,8 @@ jobs: - uses: actions-rust-lang/setup-rust-toolchain@v1 with: components: rustfmt, clippy - - name: Setup OCI runtime build env - run: ${GITHUB_WORKSPACE}/.github/scripts/build.sh + - name: Setup build env + run: ./scripts/setup.sh shell: bash - name: Run checks run: make check @@ -34,8 +34,8 @@ jobs: - uses: actions-rust-lang/setup-rust-toolchain@v1 env: RUST_CACHE_KEY_OS: ${{ matrix.os }} - - name: Setup OCI runtime build env - run: ${GITHUB_WORKSPACE}/.github/scripts/build.sh + - name: Setup build env + run: ./scripts/setup.sh shell: bash - name: Build uses: actions-rs/cargo@v1 @@ -61,8 +61,8 @@ jobs: - uses: actions/checkout@v3 - name: setup rust-wasm target run: rustup target add wasm32-wasi - - name: Setup OCI runtime build env - run: ${GITHUB_WORKSPACE}/.github/scripts/build.sh + - name: Setup build env + run: ./scripts/setup.sh shell: bash - name: run run: make test/k8s @@ -88,8 +88,8 @@ jobs: - uses: actions/checkout@v3 - name: setup rust-wasm target run: rustup target add wasm32-wasi - - name: Setup OCI runtime build env - run: ${GITHUB_WORKSPACE}/.github/scripts/build.sh + - name: Setup build env + run: ./scripts/setup.sh shell: bash - name: run run: make test/k3s diff --git a/README.md b/README.md index 9a42fd4b6..fb9b2756c 100644 --- a/README.md +++ b/README.md @@ -148,16 +148,10 @@ You will need to make sure the `containerd-[ wasmedge | wasmtime ]d` daemon has 1. Install [youki dependencies](https://github.com/containers/youki#dependencies) +If on ubuntu/debian you can use the following script. Refer to youki's documentation for other systems. + ``` -sudo apt-get install \ - pkg-config \ - libsystemd-dev \ - libdbus-glib-1-dev \ - build-essential \ - libelf-dev \ - libseccomp-dev \ - libclang-dev \ - libssl-dev +./scripts/setup.sh ``` 2. Build diff --git a/.github/scripts/build.sh b/scripts/setup.sh similarity index 62% rename from .github/scripts/build.sh rename to scripts/setup.sh index 0db980d31..31e374f1f 100755 --- a/.github/scripts/build.sh +++ b/scripts/setup.sh @@ -1,3 +1,3 @@ #!/bin/bash sudo apt -y update -sudo apt install -y pkg-config libsystemd-dev libdbus-glib-1-dev build-essential libelf-dev libseccomp-dev libclang-dev \ No newline at end of file +sudo apt install -y pkg-config libsystemd-dev libdbus-glib-1-dev build-essential libelf-dev libseccomp-dev libclang-dev