diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index 99727a15d9d8..96c9a783f826 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -38,11 +38,6 @@ jobs: name: Prepare dependencies runs-on: ubuntu-latest steps: - - name: Cache ~/.cargo - uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 - with: - path: ~/.cargo - key: cargo - run: sudo apt update && sudo apt -y install jq curl - name: Parse repo and branch information env: @@ -126,7 +121,7 @@ jobs: uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 with: path: ~/.cargo - key: cbindgen + key: ${{ github.job }}-cargo - name: Installing Rust run: | curl https://sh.rustup.rs -sSf | sh -s -- -y @@ -152,8 +147,15 @@ jobs: - name: Cache cargo registry uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 with: - path: ~/.cargo/registry - key: cargo-registry + path: ~/.cargo + key: ${{ github.job }}-cargo + + - name: Cache RPMs + uses: actions/cache@v3 + with: + path: /var/cache/dnf + key: ${{ github.job }}-dnf + - run: echo "keepcache=1" >> /etc/dnf/dnf.conf - uses: actions/checkout@v3.1.0 @@ -260,8 +262,15 @@ jobs: - name: Cache cargo registry uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 with: - path: ~/.cargo/registry - key: cargo-registry + path: ~/.cargo + key: ${{ github.job }}-cargo + + - name: Cache RPMs + uses: actions/cache@v3 + with: + path: /var/cache/dnf + key: ${{ github.job }}-dnf + - run: echo "keepcache=1" >> /etc/dnf/dnf.conf - uses: actions/checkout@v3.1.0 @@ -380,6 +389,19 @@ jobs: container: centos:7 needs: [prepare-deps, alma-8] steps: + - name: Cache ~/.cargo + uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 + with: + path: ~/.cargo + key: ${{ github.job }}-cargo + + - name: Cache RPMs + uses: actions/cache@v3 + with: + path: /var/cache/yum + key: ${{ github.job }}-yum + - run: echo "keepcache=1" >> /etc/yum.conf + - name: Install system dependencies run: | yum -y install epel-release @@ -451,8 +473,15 @@ jobs: - name: Cache cargo registry uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 with: - path: ~/.cargo/registry - key: cargo-registry + path: ~/.cargo + key: ${{ github.job }}-cargo + + - name: Cache RPMs + uses: actions/cache@v3 + with: + path: /var/cache/dnf + key: ${{ github.job }}-dnf + - run: echo "keepcache=1" >> /etc/dnf/dnf.conf - run: | dnf -y install \ @@ -541,8 +570,15 @@ jobs: - name: Cache cargo registry uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 with: - path: ~/.cargo/registry - key: cargo-registry + path: ~/.cargo + key: ${{ github.job }}-cargo + + - name: Cache RPMs + uses: actions/cache@v3 + with: + path: /var/cache/dnf + key: ${{ github.job }}-dnf + - run: echo "keepcache=1" >> /etc/dnf/dnf.conf - run: | dnf -y install \ @@ -635,8 +671,15 @@ jobs: - name: Cache cargo registry uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 with: - path: ~/.cargo/registry - key: cargo-registry + path: ~/.cargo + key: ${{ github.job }}-cargo + + - name: Cache RPMs + uses: actions/cache@v3 + with: + path: /var/cache/dnf + key: ${{ github.job }}-dnf + - run: echo "keepcache=1" >> /etc/dnf/dnf.conf - run: | dnf -y install \ @@ -726,8 +769,15 @@ jobs: - name: Cache cargo registry uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 with: - path: ~/.cargo/registry - key: cargo-registry + path: ~/.cargo + key: ${{ github.job }}-cargo + + - name: Cache RPMs + uses: actions/cache@v3 + with: + path: /var/cache/dnf + key: ${{ github.job }}-dnf + - run: echo "keepcache=1" >> /etc/dnf/dnf.conf - run: | dnf -y install \ @@ -789,6 +839,11 @@ jobs: container: ubuntu:22.04 needs: [prepare-deps, prepare-cbindgen] steps: + - name: Cache ~/.cargo + uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 + with: + path: ~/.cargo + key: ${{ github.job }}-cargo - name: Install dependencies run: | apt update @@ -901,6 +956,11 @@ jobs: container: ubuntu:22.04 needs: [prepare-deps, prepare-cbindgen] steps: + - name: Cache ~/.cargo + uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 + with: + path: ~/.cargo + key: ${{ github.job }}-cargo - name: Install dependencies run: | apt update @@ -993,6 +1053,11 @@ jobs: container: ubuntu:20.04 needs: [prepare-deps, prepare-cbindgen] steps: + - name: Cache ~/.cargo + uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 + with: + path: ~/.cargo + key: ${{ github.job }}-cargo - name: Install dependencies run: | @@ -1077,6 +1142,11 @@ jobs: container: ubuntu:20.04 needs: alma-8 steps: + - name: Cache ~/.cargo + uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 + with: + path: ~/.cargo + key: ${{ github.job }}-cargo - name: Install dependencies run: | apt update @@ -1135,8 +1205,8 @@ jobs: - name: Cache cargo registry uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 with: - path: ~/.cargo/registry - key: cargo-registry + path: ~/.cargo + key: ${{ github.job }}-cargo - name: Install dependencies run: | @@ -1207,8 +1277,8 @@ jobs: - name: Cache cargo registry uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 with: - path: ~/.cargo/registry - key: cargo-registry + path: ~/.cargo + key: ${{ github.job }}-cargo - name: Install dependencies run: | @@ -1302,8 +1372,8 @@ jobs: - name: Cache cargo registry uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 with: - path: ~/.cargo/registry - key: cargo-registry + path: ~/.cargo + key: ${{ github.job }}-cargo - name: Install dependencies run: | @@ -1365,8 +1435,8 @@ jobs: - name: Cache cargo registry uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 with: - path: ~/.cargo/registry - key: cargo-registry + path: ~/.cargo + key: ${{ github.job }}-cargo - run: | apt update @@ -1435,6 +1505,11 @@ jobs: container: debian:9 needs: [prepare-deps, prepare-cbindgen] steps: + - name: Cache ~/.cargo + uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 + with: + path: ~/.cargo + key: ${{ github.job }}-cargo - run: | apt update apt -y install \ @@ -1503,8 +1578,8 @@ jobs: - name: Cache cargo registry uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 with: - path: ~/.cargo/registry - key: cargo-registry + path: ~/.cargo + key: ${{ github.job }}-cargo - run: | brew install \ autoconf \ @@ -1523,7 +1598,7 @@ jobs: rust \ xz - name: Install cbindgen - run: cargo install --force --debug --version 0.24.3 cbindgen + run: cargo install --debug --version 0.24.3 cbindgen - run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH - run: pip3 install PyYAML - uses: actions/checkout@v3.1.0 @@ -1554,6 +1629,11 @@ jobs: run: shell: msys2 {0} steps: + - name: Cache ~/.cargo + uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 + with: + path: ~/.cargo + key: ${{ github.job }}-cargo - uses: actions/checkout@v3.1.0 - uses: msys2/setup-msys2@fa138fa56e2558760b9f2205135313c7345c5f3f with: @@ -1605,6 +1685,11 @@ jobs: run: shell: msys2 {0} steps: + - name: Cache ~/.cargo + uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 + with: + path: ~/.cargo + key: ${{ github.job }}-cargo - uses: actions/checkout@v3.1.0 - uses: msys2/setup-msys2@v2 with: