diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 15c653bf8..31fde3b1d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -60,14 +60,15 @@ 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: path: ~/.ccache - key: ccache-${{ matrix.os }}-gcc-${{ matrix.gcc }}-${{ github.sha }} + key: ccache-v2-${{ matrix.os }}-gcc-${{ matrix.gcc }}-${{ github.ref_name }}-${{ github.sha }} restore-keys: | - ccache-${{ matrix.os }}-gcc-${{ matrix.gcc }} + ccache-v2-${{ matrix.os }}-gcc-${{ matrix.gcc }}-${{ github.ref_name }} + ccache-v2-${{ matrix.os }}-gcc-${{ matrix.gcc }} - name: Download DF run: | sh ci/download-df.sh 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: 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/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 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()