diff --git a/.github/workflows/ci_integration_tests_ubuntu.yaml b/.github/workflows/ci_integration_tests_ubuntu.yaml index 1adf76d7ee..a7a4c00e28 100644 --- a/.github/workflows/ci_integration_tests_ubuntu.yaml +++ b/.github/workflows/ci_integration_tests_ubuntu.yaml @@ -19,6 +19,8 @@ env: LOGBAK_USER: ${{secrets.LOGBAK_USER}} #LOCBAK_* for upload logs to server when test failed LOGBAK_PASSWORD: ${{secrets.LOGBAK_PASSWORD}} LOGBAK_SERVER: ${{secrets.LOGBAK_SERVER}} + RUSTC_WRAPPER: sccache + SCCACHE_CACHE_SIZE: 2G jobs: prologue: name: prologue @@ -46,8 +48,37 @@ jobs: timeout-minutes: 70 runs-on: ${{ needs.prologue.outputs.linux_runner_label }} steps: + - name: Install sccache (ubuntu-latest) + env: + LINK: https://github.com/mozilla/sccache/releases/download + SCCACHE_VERSION: 0.2.13 + run: | + SCCACHE_FILE=sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl + mkdir -p $HOME/.local/bin + curl -L "$LINK/$SCCACHE_VERSION/$SCCACHE_FILE.tar.gz" | tar xz + mv -f $SCCACHE_FILE/sccache $HOME/.local/bin/sccache + echo "$HOME/.local/bin" >> $GITHUB_PATH + - name: Cache cargo registry + uses: actions/cache@v2 + continue-on-error: false + with: + path: | + ~/.cargo/registry + ~/.cargo/git + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo- + - name: Save sccache + uses: actions/cache@v2 + continue-on-error: false + with: + path: ~/.cache/sccache + key: ${{ runner.os }}-sccache-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-sccache- - uses: actions/checkout@v2 - run: | + ls -al ~/.cache/sccache if [[ ${{ needs.prologue.outputs.os_skip }} == run ]] && [[ ${{ needs.prologue.outputs.job_skip }} == run ]];then devtools/ci/ci_main.sh else diff --git a/.github/workflows/ci_linters_macos.yaml b/.github/workflows/ci_linters_macos.yaml index ae537e5895..f079703922 100644 --- a/.github/workflows/ci_linters_macos.yaml +++ b/.github/workflows/ci_linters_macos.yaml @@ -16,6 +16,8 @@ env: CARGO_TERM_COLOR: always RUST_BACKTRACE: full RUSTFLAGS: -D warnings + RUSTC_WRAPPER: sccache + SCCACHE_CACHE_SIZE: 2G jobs: prologue: name: prologue @@ -40,10 +42,35 @@ jobs: ci_linters_macos: name: ci_linters_macos needs: prologue - runs-on: macos-11 + runs-on: macos-latest steps: + - name: Install sccache (macos-latest) + run: | + brew upgrade + brew update + brew install sccache + - name: Cache cargo registry + uses: actions/cache@v2 + continue-on-error: false + with: + path: | + ~/.cargo/registry + ~/.cargo/git + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo- + - name: Save sccache + uses: actions/cache@v2 + continue-on-error: false + with: + path: /Users/runner/Library/Caches/Mozilla.sccache + key: ${{ runner.os }}-sccache-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-sccache- - uses: actions/checkout@v2 - run: | + cargo --help + ls -al /Users/runner/Library/Caches/Mozilla.sccache brew install grep gnu-sed if [[ ${{ needs.prologue.outputs.os_skip }} == run ]] && [[ ${{ needs.prologue.outputs.job_skip }} == run ]];then devtools/ci/ci_main.sh diff --git a/.github/workflows/ci_linters_ubuntu.yaml b/.github/workflows/ci_linters_ubuntu.yaml index 7b2cca1eb2..4a6cfaaf18 100644 --- a/.github/workflows/ci_linters_ubuntu.yaml +++ b/.github/workflows/ci_linters_ubuntu.yaml @@ -16,6 +16,8 @@ env: CARGO_TERM_COLOR: always RUST_BACKTRACE: full RUSTFLAGS: -D warnings + RUSTC_WRAPPER: sccache + SCCACHE_CACHE_SIZE: 2G jobs: prologue: name: prologue @@ -43,7 +45,36 @@ jobs: runs-on: ${{ needs.prologue.outputs.linux_runner_label }} steps: - uses: actions/checkout@v2 + - name: Install sccache (ubuntu-latest) + env: + LINK: https://github.com/mozilla/sccache/releases/download + SCCACHE_VERSION: 0.2.13 + run: | + SCCACHE_FILE=sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl + mkdir -p $HOME/.local/bin + curl -L "$LINK/$SCCACHE_VERSION/$SCCACHE_FILE.tar.gz" | tar xz + mv -f $SCCACHE_FILE/sccache $HOME/.local/bin/sccache + echo "$HOME/.local/bin" >> $GITHUB_PATH + - name: Cache cargo registry + uses: actions/cache@v2 + continue-on-error: false + with: + path: | + ~/.cargo/registry + ~/.cargo/git + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo- + - name: Save sccache + uses: actions/cache@v2 + continue-on-error: false + with: + path: ~/.cache/sccache + key: ${{ runner.os }}-sccache-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-sccache- - run: | + cargo --help if [[ ${{ needs.prologue.outputs.os_skip }} == run ]] && [[ ${{ needs.prologue.outputs.job_skip }} == run ]];then devtools/ci/ci_main.sh else diff --git a/.github/workflows/ci_unit_tests_windows.yaml b/.github/workflows/ci_unit_tests_windows.yaml index 38c09b71f2..7123b583b5 100644 --- a/.github/workflows/ci_unit_tests_windows.yaml +++ b/.github/workflows/ci_unit_tests_windows.yaml @@ -52,6 +52,7 @@ jobs: scoop install git scoop bucket add extras scoop install llvm yasm + scoop install sccache - run: | if [[ ${{ needs.prologue.outputs.os_skip }} == run ]] && [[ ${{ needs.prologue.outputs.job_skip }} == run ]];then devtools/ci/ci_main.sh diff --git a/Cargo.lock b/Cargo.lock index 2ca019fe13..1d4b8fe39c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -72,9 +72,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.44" +version = "1.0.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61604a8f862e1d5c3229fdd78f8b02c68dcf73a4c4b05fd636d12240aaa242c1" +checksum = "ee10e43ae4a853c0a3591d4e2ada1719e553be18199d9da9d4a83f5927c2f5c7" [[package]] name = "arc-swap" @@ -4106,9 +4106,9 @@ checksum = "1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2" [[package]] name = "syn" -version = "1.0.80" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d010a1623fbd906d51d650a9916aaefc05ffa0e4053ff7fe601167f3e715d194" +checksum = "f2afee18b8beb5a596ecb4a2dce128c719b4ba399d34126b9e4396e3f9860966" dependencies = [ "proc-macro2", "quote", @@ -4351,9 +4351,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2c2416fdedca8443ae44b4527de1ea633af61d8f7169ffa6e72c5b53d24efcc" +checksum = "588b2d10a336da58d877567cd8fb8a14b463e2104910f8132cd054b4b96e29ee" dependencies = [ "autocfg", "bytes 1.1.0",