Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github: build libbacktrace locally and use it for linux/mingw bindist #70928

Merged
merged 1 commit into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,15 @@ jobs:
sound: 1
- name: Windows Tiles x64
mxe: x86_64
libbacktrace: 1
artifact: windows-tiles-x64
os: ubuntu-latest
ext: zip
content: application/zip
sound: 0
- name: Windows Tiles Sounds x64
mxe: x86_64
libbacktrace: 1
artifact: windows-tiles-sounds-x64
os: ubuntu-latest
ext: zip
Expand All @@ -89,6 +91,7 @@ jobs:
os: ubuntu-20.04
mxe: none
android: none
libbacktrace: 1
tiles: 1
sound: 0
artifact: linux-tiles-x64
Expand All @@ -98,6 +101,7 @@ jobs:
os: ubuntu-20.04
mxe: none
android: none
libbacktrace: 1
tiles: 1
sound: 1
artifact: linux-tiles-sounds-x64
Expand All @@ -107,6 +111,7 @@ jobs:
os: ubuntu-20.04
mxe: none
android: none
libbacktrace: 1
tiles: 0
sound: 0
artifact: linux-curses-x64
Expand Down Expand Up @@ -207,9 +212,6 @@ jobs:
curl -L -o SDL2-devel-2.26.2-mingw.tar.gz https://github.com/libsdl-org/SDL/releases/download/release-2.26.2/SDL2-devel-2.26.2-mingw.tar.gz
shasum -a 256 -c ./build-scripts/SDL2-devel-2.26.2-mingw.tar.gz.sha256
sudo tar -xzf SDL2-devel-2.26.2-mingw.tar.gz -C /opt/mxe/usr/${{ matrix.mxe }}-w64-mingw32.static.gcc12 --strip-components=2 SDL2-2.26.2/${{ matrix.mxe }}-w64-mingw32
curl -L -o libbacktrace-${{ matrix.mxe }}-w64-mingw32.tar.gz https://github.com/Qrox/libbacktrace/releases/download/2020-01-03/libbacktrace-${{ matrix.mxe }}-w64-mingw32.tar.gz
shasum -a 256 -c ./build-scripts/libbacktrace-${{ matrix.mxe }}-w64-mingw32-sha256
sudo tar -xzf libbacktrace-${{ matrix.mxe }}-w64-mingw32.tar.gz --exclude=LICENSE -C /opt/mxe/usr/${{ matrix.mxe }}-w64-mingw32.static.gcc12
- name: Install dependencies (Linux)
if: runner.os == 'Linux' && matrix.mxe == 'none' && matrix.android == 'none' && !matrix.wasm
run: |
Expand Down Expand Up @@ -246,10 +248,20 @@ jobs:
shell: bash
run: |
lang/compile_mo.sh all
- name: Build libbacktrace
if: matrix.libbacktrace == 1
run: |
git clone https://github.com/ianlancetaylor/libbacktrace.git
cd libbacktrace
git checkout 14818b7783eeb9a56c3f0fca78cefd3143f8c5f6
./configure
make -j$((`nproc`+0))
cp LICENSE ${{ github.workspace }}/LICENSE-libbacktrace.txt
sudo make install
- name: Build CDDA (linux)
if: runner.os == 'Linux' && matrix.mxe == 'none' && matrix.android == 'none' && matrix.artifact != 'linux-objectcreator-x64' && !matrix.wasm
run: |
make -j$((`nproc`+0)) TILES=${{ matrix.tiles }} SOUND=${{ matrix.tiles }} RELEASE=1 LOCALIZE=1 LANGUAGES=all BACKTRACE=1 PCH=0 bindist
make -j$((`nproc`+0)) TILES=${{ matrix.tiles }} SOUND=${{ matrix.tiles }} RELEASE=1 LOCALIZE=1 LANGUAGES=all BACKTRACE=1 LIBBACKTRACE=${{ matrix.libbacktrace }} PCH=0 bindist
mv cataclysmdda-0.I.tar.gz cdda-${{ matrix.artifact }}-${{ needs.release.outputs.timestamp }}.tar.gz
- name: Build CDDA (WebAssembly)
if: matrix.wasm
Expand Down Expand Up @@ -298,7 +310,7 @@ jobs:
env:
PLATFORM: /opt/mxe/usr/bin/${{ matrix.mxe }}-w64-mingw32.static.gcc12-
run: |
make -j$((`nproc`+0)) CROSS="${PLATFORM}" TILES=1 SOUND=1 RELEASE=1 LOCALIZE=1 LANGUAGES=all BACKTRACE=1 PCH=0 bindist
make -j$((`nproc`+0)) CROSS="${PLATFORM}" TILES=1 SOUND=1 RELEASE=1 LOCALIZE=1 LANGUAGES=all BACKTRACE=1 LIBBACKTRACE=${{ matrix.libbacktrace }} PCH=0 bindist
mv cataclysmdda-0.I.zip cdda-${{ matrix.artifact }}-${{ needs.release.outputs.timestamp }}.zip
- name: Build CDDA (windows msvc)
if: runner.os == 'Windows'
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -876,6 +876,9 @@ ifeq ($(BACKTRACE),1)
ifeq ($(LIBBACKTRACE),1)
DEFINES += -DLIBBACKTRACE
LDFLAGS += -lbacktrace
ifneq ("$(wildcard LICENSE-libbacktrace.txt)","")
BINDIST_EXTRAS += LICENSE-libbacktrace.txt
endif
endif
endif

Expand Down
Loading