diff --git a/.github/workflows/release-windows.yml b/.github/workflows/release-windows.yml --- a/.github/workflows/release-windows.yml +++ b/.github/workflows/release-windows.yml @@ -39,10 +39,22 @@ jobs: run: | tar -xf source.tar.gz --strip-components=1 + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + + - name: Enable Rust cache + uses: Swatinem/rust-cache@v2 + - name: Install dependencies shell: bash run: | + echo "::group::Install choco dependencies" choco install pandoc + echo "::endgroup::" + + echo "::group::Install breakpad dependencies" + cargo install dump_syms + echo "::endgroup::" - name: Prepare cache key id: key @@ -176,6 +188,12 @@ jobs: env: WINDOWS_CERTIFICATE_COMMON_NAME: ${{ secrets.WINDOWS_CERTIFICATE_COMMON_NAME }} + - name: Create breakpad symbols + shell: bash + run: | + cd build + dump_syms openttd.pdb --inlines --store symbols + - name: Create bundles shell: bash run: | @@ -184,10 +202,13 @@ jobs: cpack echo "::endgroup::" - echo "::group::Prepare PDB to be bundled" - PDB=$(ls bundles/*.zip | cut -d/ -f2 | sed 's/.zip$/.pdb/') - cp openttd.pdb bundles/${PDB} - xz -9 bundles/${PDB} + echo "::group::Move PDB and exe to symbols" + PDB_FOLDER=$(find symbols -mindepth 2 -type d) + cp openttd.pdb ${PDB_FOLDER}/ + + EXE_FOLDER=symbols/openttd.exe/$(grep "INFO CODE_ID" symbols/*/*/openttd.sym | cut -d\ -f3) + mkdir -p ${EXE_FOLDER} + cp openttd.exe ${EXE_FOLDER}/ echo "::endgroup::" echo "::group::Cleanup" @@ -213,3 +234,10 @@ jobs: name: openttd-windows-${{ matrix.arch }} path: build/bundles retention-days: 5 + + - name: Store symbols + uses: actions/upload-artifact@v3 + with: + name: symbols-windows-${{ matrix.arch }} + path: build/symbols + retention-days: 5