From 1f6726bb031da11c54b79edf18c018b76e5e99f7 Mon Sep 17 00:00:00 2001 From: myk002 Date: Sun, 5 Jun 2022 21:54:53 -0700 Subject: [PATCH 1/7] namespace the ccache key with the repo and branch --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 15c653bf8..6dbb43e15 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -65,8 +65,9 @@ jobs: uses: actions/cache@v2 with: path: ~/.ccache - key: ccache-${{ matrix.os }}-gcc-${{ matrix.gcc }}-${{ github.sha }} + key: ccache-${{ matrix.os }}-gcc-${{ matrix.gcc }}-${{ github.repository_owner }}-${{ github.ref_name }}-${{ github.sha }} restore-keys: | + ccache-${{ matrix.os }}-gcc-${{ matrix.gcc }}-${{ github.repository_owner }}-${{ github.ref_name }} ccache-${{ matrix.os }}-gcc-${{ matrix.gcc }} - name: Download DF run: | From 9c31e4b42384fc6cb1f1fd5de0ba73fd77cf1127 Mon Sep 17 00:00:00 2001 From: myk002 Date: Sun, 5 Jun 2022 22:02:25 -0700 Subject: [PATCH 2/7] change the key so we no longer match our old cache --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6dbb43e15..8ab2221c7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -65,10 +65,10 @@ jobs: uses: actions/cache@v2 with: path: ~/.ccache - key: ccache-${{ matrix.os }}-gcc-${{ matrix.gcc }}-${{ github.repository_owner }}-${{ github.ref_name }}-${{ github.sha }} + key: ccache-v2-${{ matrix.os }}-gcc-${{ matrix.gcc }}-${{ github.repository_owner }}-${{ github.ref_name }}-${{ github.sha }} restore-keys: | - ccache-${{ matrix.os }}-gcc-${{ matrix.gcc }}-${{ github.repository_owner }}-${{ github.ref_name }} - ccache-${{ matrix.os }}-gcc-${{ matrix.gcc }} + ccache-v2-${{ matrix.os }}-gcc-${{ matrix.gcc }}-${{ github.repository_owner }}-${{ github.ref_name }} + ccache-v2-${{ matrix.os }}-gcc-${{ matrix.gcc }} - name: Download DF run: | sh ci/download-df.sh From 24d2e8e115b0c4721b34191d04863ea216e5f2b8 Mon Sep 17 00:00:00 2001 From: Myk Date: Sun, 5 Jun 2022 23:41:11 -0700 Subject: [PATCH 3/7] Update build.yml --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8ab2221c7..4ef4187be 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -65,9 +65,9 @@ jobs: uses: actions/cache@v2 with: path: ~/.ccache - key: ccache-v2-${{ matrix.os }}-gcc-${{ matrix.gcc }}-${{ github.repository_owner }}-${{ github.ref_name }}-${{ github.sha }} + key: ccache-v2-${{ matrix.os }}-gcc-${{ matrix.gcc }}-${{ github.ref_name }}-${{ github.sha }} restore-keys: | - ccache-v2-${{ matrix.os }}-gcc-${{ matrix.gcc }}-${{ github.repository_owner }}-${{ github.ref_name }} + ccache-v2-${{ matrix.os }}-gcc-${{ matrix.gcc }}-${{ github.ref_name }} ccache-v2-${{ matrix.os }}-gcc-${{ matrix.gcc }} - name: Download DF run: | From 1a4a2ec63a1a967d2726dd7b13443d4f7c9b7d1a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 6 Jun 2022 19:34:53 +0000 Subject: [PATCH 4/7] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/python-jsonschema/check-jsonschema: 0.14.3 → 0.16.0](https://github.com/python-jsonschema/check-jsonschema/compare/0.14.3...0.16.0) - [github.com/Lucas-C/pre-commit-hooks: v1.1.13 → v1.2.0](https://github.com/Lucas-C/pre-commit-hooks/compare/v1.1.13...v1.2.0) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 336bda270..d1bb4ccff 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,11 +20,11 @@ repos: args: ['--fix=lf'] - id: trailing-whitespace - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.14.3 + rev: 0.16.0 hooks: - id: check-github-workflows - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.1.13 + rev: v1.2.0 hooks: - id: forbid-tabs exclude_types: From f1ebfe94419d12ef42b7f932a651b1630a071e1e Mon Sep 17 00:00:00 2001 From: myk002 Date: Sun, 5 Jun 2022 21:21:23 -0700 Subject: [PATCH 5/7] key the DF cache on the hash of download-df.sh --- .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 4ef4187be..31fde3b1d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -60,7 +60,7 @@ jobs: uses: actions/cache@v2 with: path: ~/DF - key: ${{ steps.env_setup.outputs.df_version }} + key: ${{ steps.env_setup.outputs.df_version }}-${{ hashFiles('ci/download-df.sh') }} - name: Fetch ccache uses: actions/cache@v2 with: From c940f086b5fea09234eb9de3e773a667c0843b99 Mon Sep 17 00:00:00 2001 From: myk002 Date: Mon, 6 Jun 2022 16:38:40 -0700 Subject: [PATCH 6/7] make the extra_fns functionality clearer --- .../library/test/ecosystem/in/gui_quantum-spec.csv | 2 +- test/quickfort/ecosystem.lua | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/data/blueprints/library/test/ecosystem/in/gui_quantum-spec.csv b/data/blueprints/library/test/ecosystem/in/gui_quantum-spec.csv index 91fde500d..7ba7b2ecb 100644 --- a/data/blueprints/library/test/ecosystem/in/gui_quantum-spec.csv +++ b/data/blueprints/library/test/ecosystem/in/gui_quantum-spec.csv @@ -2,4 +2,4 @@ description=integration test for the gui/quantum script width=5 height=5 -extra_fn=test_gui_quantum +extra_fn=gui_quantum diff --git a/test/quickfort/ecosystem.lua b/test/quickfort/ecosystem.lua index 39d0f6be1..716f22e01 100644 --- a/test/quickfort/ecosystem.lua +++ b/test/quickfort/ecosystem.lua @@ -10,8 +10,10 @@ -- height (required) -- depth (default is 1) -- start (cursor offset for input blueprints, default is 1,1) --- extra_fn (the name of a global function in this file to run after applying --- all blueprints but before comparing results) +-- extra_fn (the name of a function in the extra_fns table in this file to +-- run after applying all blueprints but before comparing results. +-- this function will get the map coordinate of the upper-left +-- corner of the test area passed to it) -- -- depends on blueprint, buildingplan, and dig-now plugins (as well as the -- quickfort script and anything else run in the extra_fns, of course) @@ -301,6 +303,8 @@ local function do_dig_phase(phase_data, area, spec) run_dig_now(area) end +local extra_fns = {} + function test.end_to_end() -- read in test plan local sets = get_blueprint_sets() @@ -330,7 +334,7 @@ function test.end_to_end() -- run any extra commands, if defined by the blueprint spec if spec.extra_fn then - _ENV[spec.extra_fn](area.pos) + extra_fns[spec.extra_fn](area.pos) end -- run blueprint to generate files in output dir @@ -387,7 +391,7 @@ local function send_keys(...) end end -function test_gui_quantum(pos) +function extra_fns.gui_quantum(pos) local vehicles = assign_minecarts.get_free_vehicles() local confirm_state = confirm.isEnabled() local confirm_conf = confirm.get_conf_data() From 40a6fcdd9928d482e409801078d365b41de4e5c5 Mon Sep 17 00:00:00 2001 From: DFHack-Urist via GitHub Actions <63161697+DFHack-Urist@users.noreply.github.com> Date: Tue, 7 Jun 2022 07:18:05 +0000 Subject: [PATCH 7/7] Auto-update submodules library/xml: master scripts: master --- library/xml | 2 +- scripts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/library/xml b/library/xml index a24581cc5..51991bb39 160000 --- a/library/xml +++ b/library/xml @@ -1 +1 @@ -Subproject commit a24581cc5318bdbc6227f368f67bc03a9082c19c +Subproject commit 51991bb39224fee8111fc5edce026dcbabf078ad diff --git a/scripts b/scripts index 52e21c5e0..5ae30f01d 160000 --- a/scripts +++ b/scripts @@ -1 +1 @@ -Subproject commit 52e21c5e0c78e17acdad23f94efffb043290d5b5 +Subproject commit 5ae30f01d9d96453d6ef435d018686db4b4a76f7