From a4b99cb3fbef4a80a1d70afdeccf837665f3307b Mon Sep 17 00:00:00 2001 From: utam0k Date: Thu, 9 Feb 2023 21:36:49 +0900 Subject: [PATCH 1/2] Add rust-toolchain file Signed-off-by: utam0k --- rust-toolchain.toml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 rust-toolchain.toml diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 000000000..26c562858 --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,3 @@ +[toolchain] +profile="default" +channel="1.67.0" From 17edb09509c534ff47b3c333bef3ffc3439df9b6 Mon Sep 17 00:00:00 2001 From: utam0k Date: Thu, 9 Feb 2023 21:43:30 +0900 Subject: [PATCH 2/2] update github actions Signed-off-by: utam0k --- .../workflows/benchmark_execution_time.yml | 16 ++----- .../containerd_integration_tests.yaml | 8 +--- .../integration_tests_validation.yaml | 11 +---- .github/workflows/main.yml | 44 +++++-------------- .github/workflows/release.yml | 19 +++----- 5 files changed, 24 insertions(+), 74 deletions(-) diff --git a/.github/workflows/benchmark_execution_time.yml b/.github/workflows/benchmark_execution_time.yml index 87b177b6c..a1e503bdf 100644 --- a/.github/workflows/benchmark_execution_time.yml +++ b/.github/workflows/benchmark_execution_time.yml @@ -19,12 +19,8 @@ jobs: sudo apt -y update sudo apt install libsystemd-dev librust-libdbus-sys-dev libseccomp-dev - - name: Setting rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - profile: minimal + - name: Setup Rust toolchain and cache + uses: actions-rust-lang/setup-rust-toolchain@v1.3.7 - name: Building PR branch run: make youki-release @@ -51,12 +47,8 @@ jobs: sudo apt -y update sudo apt install libsystemd-dev librust-libdbus-sys-dev libseccomp-dev - - name: Setting rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - profile: minimal + - name: Setup Rust toolchain and cache + uses: actions-rust-lang/setup-rust-toolchain@v1.3.7 - name: Building main branch run: make youki-release diff --git a/.github/workflows/containerd_integration_tests.yaml b/.github/workflows/containerd_integration_tests.yaml index 3978e3e6d..eafcc165c 100644 --- a/.github/workflows/containerd_integration_tests.yaml +++ b/.github/workflows/containerd_integration_tests.yaml @@ -12,12 +12,8 @@ jobs: timeout-minutes: 15 steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: '1.67.0' - override: true - - name: Cache youki - uses: Swatinem/rust-cache@v1 + - 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: Build youki diff --git a/.github/workflows/integration_tests_validation.yaml b/.github/workflows/integration_tests_validation.yaml index 32867349e..70ac48a1e 100644 --- a/.github/workflows/integration_tests_validation.yaml +++ b/.github/workflows/integration_tests_validation.yaml @@ -24,17 +24,10 @@ jobs: if: ${{ !contains(needs.changes.outputs.dirs, '[]') }} runs-on: ubuntu-20.04 timeout-minutes: 15 - strategy: - matrix: - rust: [1.66.0, 1.67.0] steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ matrix.rust }} - override: true - - name: Cache youki - uses: Swatinem/rust-cache@v1 + - 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 runc 1.1.0 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 62ac1d1d7..55b65b4c1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,16 +31,11 @@ jobs: timeout-minutes: 15 strategy: matrix: - rust: [1.66.0, 1.67.0] dirs: ${{ fromJSON(needs.changes.outputs.dirs) }} steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ matrix.rust }} - override: true - - name: Cache youki - uses: Swatinem/rust-cache@v1 + - 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 - run: sudo apt-get install -y pkg-config libsystemd-dev libdbus-glib-1-dev libelf-dev libseccomp-dev @@ -53,17 +48,10 @@ jobs: tests: runs-on: ubuntu-20.04 timeout-minutes: 15 - strategy: - matrix: - rust: [1.66.0, 1.67.0] steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ matrix.rust }} - override: true - - name: Cache youki - uses: Swatinem/rust-cache@v1 + - name: Install rus + run: rustup show - 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: Run tests @@ -76,15 +64,10 @@ jobs: name: Run test coverage steps: - uses: actions/checkout@v3 - - name: Toolchain setup - uses: actions-rs/toolchain@v1 - with: - toolchain: 1.67.0 - override: true - profile: minimal - components: llvm-tools-preview - - name: Cache youki - uses: Swatinem/rust-cache@v1 + - name: Setup Rust toolchain and cache + uses: actions-rust-lang/setup-rust-toolchain@v1.3.7 + - name: Install llvm-tools-preview + run: rustup component add llvm-tools-preview - name: install cargo-llvm-cov uses: taiki-e/install-action@v1 with: @@ -105,19 +88,12 @@ jobs: integration_tests: runs-on: ubuntu-20.04 timeout-minutes: 15 - strategy: - matrix: - rust: [1.66.0, 1.67.0] steps: - uses: actions/checkout@v3 with: submodules: recursive - - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ matrix.rust }} - override: true - - name: Cache youki - uses: Swatinem/rust-cache@v1 + - 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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 70f950e29..6ce05b4d6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,10 +15,8 @@ jobs: - 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: Set up cargo - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true + - name: Setup Rust toolchain and cache + uses: actions-rust-lang/setup-rust-toolchain@v1.3.7 - name: Build run: make youki-release - name: test @@ -33,10 +31,8 @@ jobs: - 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: Set up cargo - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true + - name: Setup Rust toolchain and cache + uses: actions-rust-lang/setup-rust-toolchain@v1.3.7 - name: Release build run: make youki-release - name: Create output directory @@ -104,11 +100,8 @@ jobs: CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} steps: - uses: actions/checkout@v3 - - name: Set up cargo - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true + - name: Setup Rust toolchain and cache + uses: actions-rust-lang/setup-rust-toolchain@v1.3.7 - name: Publish libcgroups run: cargo publish -p libcgroups --no-verify - name: Publish libcontainer