From cec3502bf6bfb6e7429bd5294ef54ddaa8a0a6c1 Mon Sep 17 00:00:00 2001 From: Justin Moon Date: Mon, 6 Jul 2020 12:10:29 -0500 Subject: [PATCH 1/4] Attempt to speed up CI by caching cargo dependencies --- .github/workflows/ci.yml | 45 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4609f80110..81c1e90fac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,6 +34,15 @@ jobs: steps: - uses: actions/checkout@v2 + - uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + if: contains(matrix.os, 'ubuntu') + - name: install libgtk-3-dev libx11-dev run: | sudo apt update @@ -138,6 +147,15 @@ jobs: steps: - uses: actions/checkout@v2 + - uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + if: contains(matrix.os, 'ubuntu') + # libgtk-dev seems to be needed by e.g. druid-derive - name: install libgtk-dev run: | @@ -239,6 +257,15 @@ jobs: steps: - uses: actions/checkout@v2 + - uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + if: contains(matrix.os, 'ubuntu') + - name: install libgtk-dev libx11-dev run: | sudo apt update @@ -302,6 +329,15 @@ jobs: steps: - uses: actions/checkout@v2 + - uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + if: contains(matrix.os, 'ubuntu') + - name: install libgtk-dev run: | sudo apt update @@ -354,6 +390,15 @@ jobs: steps: - uses: actions/checkout@v2 + - uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + if: contains(matrix.os, 'ubuntu') + - name: install stable toolchain uses: actions-rs/toolchain@v1 with: From a31106b0d4fb7708f63c6972fa86c327754a9188 Mon Sep 17 00:00:00 2001 From: Justin Moon Date: Mon, 6 Jul 2020 12:24:35 -0500 Subject: [PATCH 2/4] Also cache MacOS dependencies on CI --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 81c1e90fac..7a9b1bec2f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,7 +41,7 @@ jobs: ~/.cargo/git target key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - if: contains(matrix.os, 'ubuntu') + if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'MacOS') - name: install libgtk-3-dev libx11-dev run: | @@ -154,7 +154,7 @@ jobs: ~/.cargo/git target key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - if: contains(matrix.os, 'ubuntu') + if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'MacOS') # libgtk-dev seems to be needed by e.g. druid-derive - name: install libgtk-dev @@ -264,7 +264,7 @@ jobs: ~/.cargo/git target key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - if: contains(matrix.os, 'ubuntu') + if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'MacOS') - name: install libgtk-dev libx11-dev run: | @@ -336,7 +336,7 @@ jobs: ~/.cargo/git target key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - if: contains(matrix.os, 'ubuntu') + if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'MacOS') - name: install libgtk-dev run: | @@ -397,7 +397,7 @@ jobs: ~/.cargo/git target key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - if: contains(matrix.os, 'ubuntu') + if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'MacOS') - name: install stable toolchain uses: actions-rs/toolchain@v1 From 31f8ea1d44041a54ebe0ac7b94d416b41e7e5072 Mon Sep 17 00:00:00 2001 From: Justin Moon Date: Mon, 6 Jul 2020 13:48:24 -0500 Subject: [PATCH 3/4] Try running Linux, MacOS and Windows --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7a9b1bec2f..43febd91c3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,7 +41,7 @@ jobs: ~/.cargo/git target key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'MacOS') + #if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'MacOS') - name: install libgtk-3-dev libx11-dev run: | @@ -154,7 +154,7 @@ jobs: ~/.cargo/git target key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'MacOS') + #if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'MacOS') # libgtk-dev seems to be needed by e.g. druid-derive - name: install libgtk-dev @@ -264,7 +264,7 @@ jobs: ~/.cargo/git target key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'MacOS') + #if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'MacOS') - name: install libgtk-dev libx11-dev run: | @@ -336,7 +336,7 @@ jobs: ~/.cargo/git target key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'MacOS') + #if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'MacOS') - name: install libgtk-dev run: | @@ -397,7 +397,7 @@ jobs: ~/.cargo/git target key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'MacOS') + #if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'MacOS') - name: install stable toolchain uses: actions-rs/toolchain@v1 From 7784fe073d4bc986121bed21b91c17a3b245147a Mon Sep 17 00:00:00 2001 From: Justin Moon Date: Mon, 6 Jul 2020 14:39:36 -0500 Subject: [PATCH 4/4] Attempt to generate Cargo.lock --- .github/workflows/ci.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 43febd91c3..d1dc47ecc6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,6 +34,9 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Generate Cargo.lock + run: cargo generate-lockfile + - uses: actions/cache@v2 with: path: | @@ -147,6 +150,9 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Generate Cargo.lock + run: cargo generate-lockfile + - uses: actions/cache@v2 with: path: | @@ -257,6 +263,9 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Generate Cargo.lock + run: cargo generate-lockfile + - uses: actions/cache@v2 with: path: | @@ -329,6 +338,9 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Generate Cargo.lock + run: cargo generate-lockfile + - uses: actions/cache@v2 with: path: | @@ -390,6 +402,9 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Generate Cargo.lock + run: cargo generate-lockfile + - uses: actions/cache@v2 with: path: |