From aa9192eef13df7b47535a99c33a0411c79f8d287 Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Mon, 1 May 2023 15:46:04 -0700 Subject: [PATCH 1/8] fun with rust caching --- .github/workflows/build.yml | 8 ++- .github/workflows/validate.yml | 100 ++++++++++++++++----------------- 2 files changed, 55 insertions(+), 53 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 80f7c9a3d..723863c5a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,16 +19,18 @@ jobs: components: rustfmt, clippy - name: Set up cargo cache - uses: actions/cache@v3 + uses: actions/rust-cache@v2 continue-on-error: false with: + workspaces: | + zeroidc/ path: | ~/.cargo/bin/ ~/.cargo/registry/index/ ~/.cargo/registry/cache/ ~/.cargo/git/db/ - target/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + ./zeroidc/target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('zeroidc//Cargo.lock') }} restore-keys: ${{ runner.os }}-cargo- - name: make run: make diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 665c34945..f6621c8aa 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -1,57 +1,57 @@ -on: [ push ] +# on: [ push ] -jobs: - build_ubuntu: - runs-on: ubuntu-latest - steps: - - name: gitconfig - run: | - git config --global core.autocrlf input +# jobs: +# build_ubuntu: +# runs-on: ubuntu-latest +# steps: +# - name: gitconfig +# run: | +# git config --global core.autocrlf input - - name: checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 +# - name: checkout +# uses: actions/checkout@v3 +# with: +# fetch-depth: 0 - - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - target: x86_64-unknown-linux-gnu - override: true - components: rustfmt, clippy +# - name: Install Rust +# uses: actions-rs/toolchain@v1 +# with: +# toolchain: stable +# target: x86_64-unknown-linux-gnu +# override: true +# components: rustfmt, clippy - - name: Set up cargo cache - uses: actions/cache@v3 - continue-on-error: false - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - **/target/ - key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }} - restore-keys: ${{ runner.os }}-cargo- +# - name: Set up cargo cache +# uses: actions/cache@v3 +# continue-on-error: false +# with: +# path: | +# ~/.cargo/bin/ +# ~/.cargo/registry/index/ +# ~/.cargo/registry/cache/ +# ~/.cargo/git/db/ +# **/target/ +# key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }} +# restore-keys: ${{ runner.os }}-cargo- - - name: validate-1m-linux - env: - CC: 'gcc' - CXX: 'g++' - BRANCH: ${{ github.ref_name }} - run: | - sudo apt install -y valgrind xmlstarlet gcovr iperf3 - make one ZT_COVERAGE=1 ZT_TRACE=1 - sudo chmod +x ./.github/workflows/validate-1m-linux.sh - sudo ./.github/workflows/validate-1m-linux.sh +# - name: validate-1m-linux +# env: +# CC: 'gcc' +# CXX: 'g++' +# BRANCH: ${{ github.ref_name }} +# run: | +# sudo apt install -y valgrind xmlstarlet gcovr iperf3 +# make one ZT_COVERAGE=1 ZT_TRACE=1 +# sudo chmod +x ./.github/workflows/validate-1m-linux.sh +# sudo ./.github/workflows/validate-1m-linux.sh - - name: Archive test results - uses: actions/upload-artifact@v3 - with: - name: ${{github.sha}}-test-results - path: "*test-results*" +# - name: Archive test results +# uses: actions/upload-artifact@v3 +# with: +# name: ${{github.sha}}-test-results +# path: "*test-results*" - - name: final-report - run: | - sudo chmod +x ./.github/workflows/report.sh - sudo ./.github/workflows/report.sh +# - name: final-report +# run: | +# sudo chmod +x ./.github/workflows/report.sh +# sudo ./.github/workflows/report.sh From e63c4e102faa7b9783adf3e560fa05a13d43cb5a Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Mon, 1 May 2023 15:46:58 -0700 Subject: [PATCH 2/8] kick --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 723863c5a..d8dddda28 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,7 +19,7 @@ jobs: components: rustfmt, clippy - name: Set up cargo cache - uses: actions/rust-cache@v2 + uses: Swatinem/rust-cache@v2 continue-on-error: false with: workspaces: | From 71cd538e343fbb949cc92d696bcade92b3a64df1 Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Mon, 1 May 2023 15:54:05 -0700 Subject: [PATCH 3/8] comment out invalid yaml keys for now --- .github/workflows/build.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d8dddda28..981e22f2c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,12 +24,12 @@ jobs: with: workspaces: | zeroidc/ - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - ./zeroidc/target/ + # path: | + # ~/.cargo/bin/ + # ~/.cargo/registry/index/ + # ~/.cargo/registry/cache/ + # ~/.cargo/git/db/ + # ./zeroidc/target/ key: ${{ runner.os }}-cargo-${{ hashFiles('zeroidc//Cargo.lock') }} restore-keys: ${{ runner.os }}-cargo- - name: make From 220f1a1833f301a33264c96fdc8abf48b79b2dee Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Mon, 1 May 2023 15:57:48 -0700 Subject: [PATCH 4/8] Caching should now work --- .github/workflows/build.yml | 32 +++--------- .github/workflows/validate.yml | 94 ++++++++++++++++------------------ 2 files changed, 50 insertions(+), 76 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 981e22f2c..7d3de01e6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,14 +24,6 @@ jobs: with: workspaces: | zeroidc/ - # path: | - # ~/.cargo/bin/ - # ~/.cargo/registry/index/ - # ~/.cargo/registry/cache/ - # ~/.cargo/git/db/ - # ./zeroidc/target/ - key: ${{ runner.os }}-cargo-${{ hashFiles('zeroidc//Cargo.lock') }} - restore-keys: ${{ runner.os }}-cargo- - name: make run: make - name: selftest @@ -56,17 +48,11 @@ jobs: override: true components: rustfmt, clippy - name: Set up cargo cache - uses: actions/cache@v3 + uses: Swatinem/rust-cache@v2 continue-on-error: false with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - restore-keys: ${{ runner.os }}-cargo- + workspaces: | + zeroidc/ - name: make run: make - name: selftest @@ -91,17 +77,11 @@ jobs: override: true components: rustfmt, clippy - name: Set up cargo cache - uses: actions/cache@v3 + uses: Swatinem/rust-cache@v2 continue-on-error: false with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - restore-keys: ${{ runner.os }}-cargo- + workspaces: | + zeroidc/ - name: setup msbuild uses: microsoft/setup-msbuild@v1.1.3 - name: msbuild diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index f6621c8aa..4a07243aa 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -1,57 +1,51 @@ -# on: [ push ] +on: [ push ] -# jobs: -# build_ubuntu: -# runs-on: ubuntu-latest -# steps: -# - name: gitconfig -# run: | -# git config --global core.autocrlf input +jobs: + build_ubuntu: + runs-on: ubuntu-latest + steps: + - name: gitconfig + run: | + git config --global core.autocrlf input -# - name: checkout -# uses: actions/checkout@v3 -# with: -# fetch-depth: 0 + - name: checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 -# - name: Install Rust -# uses: actions-rs/toolchain@v1 -# with: -# toolchain: stable -# target: x86_64-unknown-linux-gnu -# override: true -# components: rustfmt, clippy + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + target: x86_64-unknown-linux-gnu + override: true + components: rustfmt, clippy -# - name: Set up cargo cache -# uses: actions/cache@v3 -# continue-on-error: false -# with: -# path: | -# ~/.cargo/bin/ -# ~/.cargo/registry/index/ -# ~/.cargo/registry/cache/ -# ~/.cargo/git/db/ -# **/target/ -# key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }} -# restore-keys: ${{ runner.os }}-cargo- + - name: Set up cargo cache + uses: Swatinem/rust-cache@v2 + continue-on-error: false + with: + workspaces: | + zeroidc/ -# - name: validate-1m-linux -# env: -# CC: 'gcc' -# CXX: 'g++' -# BRANCH: ${{ github.ref_name }} -# run: | -# sudo apt install -y valgrind xmlstarlet gcovr iperf3 -# make one ZT_COVERAGE=1 ZT_TRACE=1 -# sudo chmod +x ./.github/workflows/validate-1m-linux.sh -# sudo ./.github/workflows/validate-1m-linux.sh + - name: validate-1m-linux + env: + CC: 'gcc' + CXX: 'g++' + BRANCH: ${{ github.ref_name }} + run: | + sudo apt install -y valgrind xmlstarlet gcovr iperf3 + make one ZT_COVERAGE=1 ZT_TRACE=1 + sudo chmod +x ./.github/workflows/validate-1m-linux.sh + sudo ./.github/workflows/validate-1m-linux.sh -# - name: Archive test results -# uses: actions/upload-artifact@v3 -# with: -# name: ${{github.sha}}-test-results -# path: "*test-results*" + - name: Archive test results + uses: actions/upload-artifact@v3 + with: + name: ${{github.sha}}-test-results + path: "*test-results*" -# - name: final-report -# run: | -# sudo chmod +x ./.github/workflows/report.sh -# sudo ./.github/workflows/report.sh + - name: final-report + run: | + sudo chmod +x ./.github/workflows/report.sh + sudo ./.github/workflows/report.sh From 3e0f8dca5dfa2f1778eaea2a81ea8179109b0253 Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Mon, 1 May 2023 16:03:13 -0700 Subject: [PATCH 5/8] re-add/rename key directives --- .github/workflows/build.yml | 6 ++++++ .github/workflows/validate.yml | 2 ++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7d3de01e6..ff15f8772 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,6 +24,8 @@ jobs: with: workspaces: | zeroidc/ + key: ${{ runner.os }}-cargo-${{ hashFiles('zeroidc//Cargo.lock') }} + shared-key: {{ runner.os }}-cargo- - name: make run: make - name: selftest @@ -53,6 +55,8 @@ jobs: with: workspaces: | zeroidc/ + key: ${{ runner.os }}-cargo-${{ hashFiles('zeroidc//Cargo.lock') }} + shared-key: {{ runner.os }}-cargo- - name: make run: make - name: selftest @@ -82,6 +86,8 @@ jobs: with: workspaces: | zeroidc/ + key: ${{ runner.os }}-cargo-${{ hashFiles('zeroidc//Cargo.lock') }} + shared-key: {{ runner.os }}-cargo- - name: setup msbuild uses: microsoft/setup-msbuild@v1.1.3 - name: msbuild diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 4a07243aa..e0c9fecfd 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -27,6 +27,8 @@ jobs: with: workspaces: | zeroidc/ + key: ${{ runner.os }}-cargo-${{ hashFiles('zeroidc//Cargo.lock') }} + shared-key: {{ runner.os }}-cargo- - name: validate-1m-linux env: From 7e1729cce4761634ade286a0f82f100ffafa2343 Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Mon, 1 May 2023 16:06:38 -0700 Subject: [PATCH 6/8] bump --- .github/workflows/build.yml | 15 +++++++++------ .github/workflows/validate.yml | 4 ++-- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ff15f8772..13c22d768 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,10 +22,11 @@ jobs: uses: Swatinem/rust-cache@v2 continue-on-error: false with: - workspaces: | - zeroidc/ key: ${{ runner.os }}-cargo-${{ hashFiles('zeroidc//Cargo.lock') }} shared-key: {{ runner.os }}-cargo- + workspaces: | + zeroidc/ + - name: make run: make - name: selftest @@ -53,10 +54,11 @@ jobs: uses: Swatinem/rust-cache@v2 continue-on-error: false with: - workspaces: | - zeroidc/ key: ${{ runner.os }}-cargo-${{ hashFiles('zeroidc//Cargo.lock') }} shared-key: {{ runner.os }}-cargo- + workspaces: | + zeroidc/ + - name: make run: make - name: selftest @@ -84,10 +86,11 @@ jobs: uses: Swatinem/rust-cache@v2 continue-on-error: false with: - workspaces: | - zeroidc/ key: ${{ runner.os }}-cargo-${{ hashFiles('zeroidc//Cargo.lock') }} shared-key: {{ runner.os }}-cargo- + workspaces: | + zeroidc/ + - name: setup msbuild uses: microsoft/setup-msbuild@v1.1.3 - name: msbuild diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index e0c9fecfd..fa997f121 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -25,10 +25,10 @@ jobs: uses: Swatinem/rust-cache@v2 continue-on-error: false with: - workspaces: | - zeroidc/ key: ${{ runner.os }}-cargo-${{ hashFiles('zeroidc//Cargo.lock') }} shared-key: {{ runner.os }}-cargo- + workspaces: | + zeroidc/ - name: validate-1m-linux env: From 4bf0821e183865d752966588fa6ea66eff53ad26 Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Mon, 1 May 2023 16:08:06 -0700 Subject: [PATCH 7/8] bump --- .github/workflows/build.yml | 6 +++--- .github/workflows/validate.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 13c22d768..657c8d8c7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ jobs: continue-on-error: false with: key: ${{ runner.os }}-cargo-${{ hashFiles('zeroidc//Cargo.lock') }} - shared-key: {{ runner.os }}-cargo- + shared-key: ${{ runner.os }}-cargo- workspaces: | zeroidc/ @@ -55,7 +55,7 @@ jobs: continue-on-error: false with: key: ${{ runner.os }}-cargo-${{ hashFiles('zeroidc//Cargo.lock') }} - shared-key: {{ runner.os }}-cargo- + shared-key: ${{ runner.os }}-cargo- workspaces: | zeroidc/ @@ -87,7 +87,7 @@ jobs: continue-on-error: false with: key: ${{ runner.os }}-cargo-${{ hashFiles('zeroidc//Cargo.lock') }} - shared-key: {{ runner.os }}-cargo- + shared-key: ${{ runner.os }}-cargo- workspaces: | zeroidc/ diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index fa997f121..a9c5a8929 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -26,7 +26,7 @@ jobs: continue-on-error: false with: key: ${{ runner.os }}-cargo-${{ hashFiles('zeroidc//Cargo.lock') }} - shared-key: {{ runner.os }}-cargo- + shared-key: ${{ runner.os }}-cargo- workspaces: | zeroidc/ From cbea16a8b9a5351ef9638c5a7b55a0a78049d1ff Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Mon, 1 May 2023 16:27:16 -0700 Subject: [PATCH 8/8] bump --- .github/workflows/validate.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index a9c5a8929..55f81e557 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -51,3 +51,4 @@ jobs: run: | sudo chmod +x ./.github/workflows/report.sh sudo ./.github/workflows/report.sh +