Skip to content

Commit 669e5b9

Browse files
authored
Improve CI workflows (simdjson#1291)
* Fix Cirrus CI CMake is not installed at this point yet. * Add caching in Circle CI * Add caching to the MinGW Github workflows * Fix Circle CI config Co-authored-by: friendlyanon <friendlyanon@users.noreply.github.com>
1 parent a06e095 commit 669e5b9

File tree

4 files changed

+28
-1
lines changed

4 files changed

+28
-1
lines changed

.circleci/config.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,19 @@ executors:
6161

6262
# Reusable test commands (and initializer for clang 6)
6363
commands:
64+
dependency_restore:
65+
steps:
66+
- restore_cache:
67+
keys:
68+
- cmake-cache-{{ checksum "dependencies/CMakeLists.txt" }}
69+
70+
dependency_cache:
71+
steps:
72+
- save_cache:
73+
key: cmake-cache-{{ checksum "dependencies/CMakeLists.txt" }}
74+
paths:
75+
- dependencies/.cache
76+
6477
install_cmake:
6578
steps:
6679
- run: apt-get update -qq
@@ -74,7 +87,9 @@ commands:
7487
cmake_build_cache:
7588
steps:
7689
- cmake_prep
90+
- dependency_restore
7791
- run: cmake $CMAKE_FLAGS -DCMAKE_INSTALL_PREFIX:PATH=destination -B build .
92+
- dependency_cache # dependencies are produced in the configure step
7893

7994
cmake_build:
8095
steps:

.cirrus.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ task:
1010
dep_cache:
1111
folder: $HOME/.dep_cache
1212
reupload_on_changes: false
13-
fingerprint_script: cmake -E sha512sum dependencies/CMakeLists.txt
13+
fingerprint_script: cat dependencies/CMakeLists.txt
1414
setup_script:
1515
- pkg update -f
1616
- pkg install bash

.github/workflows/mingw-ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ jobs:
2626
path: |
2727
C:\ProgramData\scoop
2828
key: scoop32 # static key: should be good forever
29+
30+
- uses: actions/cache@v2
31+
with:
32+
path: dependencies/.cache
33+
key: ${{ hashFiles('dependencies/CMakeLists.txt') }}
34+
2935
- name: Setup Windows # This should almost never run if the cache works.
3036
if: steps.cache.outputs.cache-hit != 'true'
3137
shell: powershell

.github/workflows/mingw64-ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ jobs:
2626
path: |
2727
C:\ProgramData\scoop
2828
key: scoop64 # static key: should be good forever
29+
30+
- uses: actions/cache@v2
31+
with:
32+
path: dependencies/.cache
33+
key: ${{ hashFiles('dependencies/CMakeLists.txt') }}
34+
2935
- name: Setup Windows # This should almost never run if the cache works.
3036
if: steps.cache.outputs.cache-hit != 'true'
3137
shell: powershell

0 commit comments

Comments
 (0)