Skip to content

Commit 6adf0d7

Browse files
committed
Further testing
1 parent 5b1a3d7 commit 6adf0d7

File tree

2 files changed

+101
-105
lines changed

2 files changed

+101
-105
lines changed

.github/workflows/build-windows.yml

Lines changed: 51 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,6 @@ jobs:
6868
name: Build win64
6969
runs-on: windows-2022
7070
steps:
71-
# - name: Install dependencies
72-
# run: |
73-
# sudo apt-get update
74-
# sudo apt-get install ccache
7571
- name: Clone DFHack
7672
uses: actions/checkout@v4
7773
with:
@@ -108,15 +104,22 @@ jobs:
108104
ref: main
109105
ssh-key: ${{ secrets.DFHACK_3RDPARTY_TOKEN }}
110106
path: depends/steam
111-
# - name: Fetch ccache
112-
# if: inputs.platform-files
113-
# uses: actions/cache/restore@v4
114-
# with:
115-
# path: build/win64-cross/ccache
116-
# key: win-msvc-${{ inputs.cache-id }}-${{ github.sha }}
117-
# restore-keys: |
118-
# win-msvc-${{ inputs.cache-id }}
119-
# win-msvc
107+
- uses: ilammy/msvc-dev-cmd@v1
108+
- name: Install Build Dependencies
109+
run: |
110+
pip3 install --compile sphinx
111+
pip3 install six
112+
choco install sccache
113+
- name: Prepare Environment
114+
run: |
115+
mkdir -p /output
116+
mkdir -p /pdb
117+
- name: Configure sccache
118+
uses: actions/github-script@v7
119+
with:
120+
script: |
121+
core.exportVariable('ACTIONS_RESULTS_URL', process.env.ACTIONS_RESULTS_URL || '');
122+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
120123
- name: Configure DFHack
121124
env:
122125
CMAKE_EXTRA_ARGS: -DBUILD_PDBS:BOOL=${{ inputs.cache-id == 'release' }} -DDFHACK_RUN_URL='https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' -DBUILD_LIBRARY=${{ inputs.platform-files }} -DBUILD_PLUGINS:BOOL=${{ inputs.platform-files && inputs.plugins }} -DBUILD_STONESENSE:BOOL=${{ inputs.stonesense }} -DBUILD_DOCS:BOOL=${{ inputs.docs }} -DBUILD_DOCS_NO_HTML:BOOL=${{ !inputs.html }} -DINSTALL_DATA_FILES:BOOL=${{ inputs.common-files }} -DINSTALL_SCRIPTS:BOOL=${{ inputs.common-files }} -DBUILD_DFLAUNCH:BOOL=${{ inputs.launchdf }} -DBUILD_TESTS:BOOL=${{ inputs.tests }} -DBUILD_XMLDUMP:BOOL=${{ inputs.xml-dump-type-sizes }} ${{ inputs.xml-dump-type-sizes && '-DINSTALL_XMLDUMP:BOOL=1' || '' }}
@@ -125,49 +128,42 @@ jobs:
125128
run: |
126129
cmake -S . `
127130
-B build `
128-
-DCMAKE_BUILD_ARCH=64 `
131+
-GNinja `
132+
-DDFHACK_BUILD_ARCH=64 `
129133
-DCMAKE_BUILD_TYPE=Release `
130-
${CMAKE_EXTRA_ARGS}
134+
-DBUILD_DOCS=1 `
135+
-DCMAKE_INSTALL_PREFIX=/output `
136+
-DCMAKE_C_COMPILER_LAUNCHER=sccache `
137+
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache `
138+
$CMAKE_EXTRA_ARGS
131139
- name: Build DFHack
132140
run: |
133141
cmake --build build
134-
# - name: Finalize cache
135-
# run: |
136-
# cd build
137-
# ccache -d win64-cross/ccache --show-stats --verbose
138-
# ccache -d win64-cross/ccache --max-size ${{ inputs.cache-id == 'release' && '500M' || '150M' }}
139-
# ccache -d win64-cross/ccache --cleanup
140-
# ccache -d win64-cross/ccache --max-size ${{ inputs.cache-id == 'release' && '2G' || '500M' }}
141-
# ccache -d win64-cross/ccache --zero-stats
142-
# - name: Save ccache
143-
# if: inputs.platform-files && !inputs.cache-readonly
144-
# uses: actions/cache/save@v4
145-
# with:
146-
# path: build/win64-cross/ccache
147-
# key: win-msvc-${{ inputs.cache-id }}-${{ github.sha }}
148-
# - name: Format artifact name
149-
# if: inputs.artifact-name
150-
# id: artifactname
151-
# run: |
152-
# if test "false" = "${{ inputs.append-date-and-hash }}"; then
153-
# echo name=${{ inputs.artifact-name }} >> $GITHUB_OUTPUT
154-
# else
155-
# echo name=${{ inputs.artifact-name }}-$(date +%Y%m%d)-$(git rev-parse --short HEAD) >> $GITHUB_OUTPUT
156-
# fi
157-
# - name: Prep artifact
158-
# if: inputs.artifact-name
159-
# run: |
160-
# cd build/win64-cross/output
161-
# tar cjf ../../../${{ steps.artifactname.outputs.name }}.tar.bz2 .
162-
# - name: Upload artifact
163-
# if: inputs.artifact-name
164-
# uses: actions/upload-artifact@v4
165-
# with:
166-
# name: ${{ steps.artifactname.outputs.name }}
167-
# path: ${{ steps.artifactname.outputs.name }}.tar.bz2
168-
# - name: Upload PDBs
169-
# if: inputs.artifact-name && inputs.cache-id == 'release'
170-
# uses: actions/upload-artifact@v4
171-
# with:
172-
# name: ${{ steps.artifactname.outputs.name }}_pdb
173-
# path: build/win64-cross/pdb
142+
- name: Format artifact name
143+
if: inputs.artifact-name
144+
id: artifactname
145+
run: |
146+
if test "false" = "${{ inputs.append-date-and-hash }}"; then
147+
echo name=${{ inputs.artifact-name }} >> $GITHUB_OUTPUT
148+
else
149+
echo name=${{ inputs.artifact-name }}-$(date +%Y%m%d)-$(git rev-parse --short HEAD) >> $GITHUB_OUTPUT
150+
fi
151+
- name: Prep artifact
152+
if: inputs.artifact-name
153+
run: |
154+
Get-ChildItem -Recurse -File -Fitler *.pdb |
155+
Copy-Item -Destination "/pdb"
156+
cd /output
157+
tar cjf /${{ steps.artifactname.outputs.name }}.tar.bz2 .
158+
- name: Upload artifact
159+
if: inputs.artifact-name
160+
uses: actions/upload-artifact@v4
161+
with:
162+
name: ${{ steps.artifactname.outputs.name }}
163+
path: /${{ steps.artifactname.outputs.name }}.tar.bz2
164+
- name: Upload PDBs
165+
if: inputs.artifact-name && inputs.cache-id == 'release'
166+
uses: actions/upload-artifact@v4
167+
with:
168+
name: ${{ steps.artifactname.outputs.name }}_pdb
169+
path: /pdb

.github/workflows/test.yml

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -36,33 +36,33 @@ jobs:
3636
html: false
3737
tests: true
3838

39-
build-linux:
40-
name: Linux gcc-${{ matrix.gcc }}
41-
uses: ./.github/workflows/build-linux.yml
42-
with:
43-
dfhack_repo: ${{ inputs.dfhack_repo }}
44-
dfhack_ref: ${{ inputs.dfhack_ref }}
45-
scripts_repo: ${{ inputs.scripts_repo }}
46-
scripts_ref: ${{ inputs.scripts_ref }}
47-
structures_repo: ${{ inputs.structures_repo }}
48-
structures_ref: ${{ inputs.structures_ref }}
49-
artifact-name: test-gcc-${{ matrix.gcc }}
50-
cache-id: test
51-
stonesense: ${{ matrix.plugins == 'all' }}
52-
extras: ${{ matrix.plugins == 'all' }}
53-
docs: true
54-
html: false
55-
tests: true
56-
gcc-ver: ${{ matrix.gcc }}
57-
secrets: inherit
58-
strategy:
59-
fail-fast: false
60-
matrix:
61-
include:
62-
- gcc: 11 # baseline compatibility with ubuntu LTS 22.04
63-
plugins: "default"
64-
- gcc: 12 # highest available in ubuntu 22.04
65-
plugins: "all"
39+
# build-linux:
40+
# name: Linux gcc-${{ matrix.gcc }}
41+
# uses: ./.github/workflows/build-linux.yml
42+
# with:
43+
# dfhack_repo: ${{ inputs.dfhack_repo }}
44+
# dfhack_ref: ${{ inputs.dfhack_ref }}
45+
# scripts_repo: ${{ inputs.scripts_repo }}
46+
# scripts_ref: ${{ inputs.scripts_ref }}
47+
# structures_repo: ${{ inputs.structures_repo }}
48+
# structures_ref: ${{ inputs.structures_ref }}
49+
# artifact-name: test-gcc-${{ matrix.gcc }}
50+
# cache-id: test
51+
# stonesense: ${{ matrix.plugins == 'all' }}
52+
# extras: ${{ matrix.plugins == 'all' }}
53+
# docs: true
54+
# html: false
55+
# tests: true
56+
# gcc-ver: ${{ matrix.gcc }}
57+
# secrets: inherit
58+
# strategy:
59+
# fail-fast: false
60+
# matrix:
61+
# include:
62+
# - gcc: 11 # baseline compatibility with ubuntu LTS 22.04
63+
# plugins: "default"
64+
# - gcc: 12 # highest available in ubuntu 22.04
65+
# plugins: "all"
6666

6767
test-windows:
6868
name: Run Windows test suite
@@ -88,26 +88,26 @@ jobs:
8888
plugins: default
8989
config: empty
9090

91-
test-linux:
92-
name: Run Linux test suite
93-
needs: build-linux
94-
uses: ./.github/workflows/test-suite.yml
95-
with:
96-
dfhack_repo: ${{ inputs.dfhack_repo }}
97-
dfhack_ref: ${{ inputs.dfhack_ref }}
98-
os: ubuntu
99-
compiler: gcc-11
100-
plugins: default
101-
config: default
102-
103-
test-linux-gcc-12-all-plugins:
104-
name: Run Linux test suite (gcc-12, all plugins)
105-
needs: build-linux
106-
uses: ./.github/workflows/test-suite.yml
107-
with:
108-
dfhack_repo: ${{ inputs.dfhack_repo }}
109-
dfhack_ref: ${{ inputs.dfhack_ref }}
110-
os: ubuntu
111-
compiler: gcc-12
112-
plugins: all
113-
config: default
91+
# test-linux:
92+
# name: Run Linux test suite
93+
# needs: build-linux
94+
# uses: ./.github/workflows/test-suite.yml
95+
# with:
96+
# dfhack_repo: ${{ inputs.dfhack_repo }}
97+
# dfhack_ref: ${{ inputs.dfhack_ref }}
98+
# os: ubuntu
99+
# compiler: gcc-11
100+
# plugins: default
101+
# config: default
102+
#
103+
# test-linux-gcc-12-all-plugins:
104+
# name: Run Linux test suite (gcc-12, all plugins)
105+
# needs: build-linux
106+
# uses: ./.github/workflows/test-suite.yml
107+
# with:
108+
# dfhack_repo: ${{ inputs.dfhack_repo }}
109+
# dfhack_ref: ${{ inputs.dfhack_ref }}
110+
# os: ubuntu
111+
# compiler: gcc-12
112+
# plugins: all
113+
# config: default

0 commit comments

Comments
 (0)