Skip to content

Disable libfmt double precision patch #57

Disable libfmt double precision patch

Disable libfmt double precision patch #57

Workflow file for this run

---
name: Sega Dreamcast
on: # yamllint disable-line rule:truthy
push:
branches:
- master
- dreamcast
- fix/ISSUE-8-libfmt-patch
paths-ignore:
- '*.md'
- 'docs/**'
pull_request:
types: [opened, synchronize]
paths-ignore:
- '*.md'
- 'docs/**'
release:
types: [published]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
container: azihassan/kallistios:docker
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Uninstall kos-ports SDL 1.2
run: |
source /opt/toolchains/dc/kos/environ.sh && \
cd /opt/toolchains/dc/kos-ports/SDL && \
make uninstall || echo 'SDL 1.2 uninstall finished with non zero status, proceding anyway'
- name: Install GPF SDL 1.2
run: |
git clone -b SDL-dreamhal--GLDC https://github.com/GPF/SDL-1.2 && \
cd SDL-1.2 && \
source /opt/toolchains/dc/kos/environ.sh && \
make -f Makefile.dc && \
cp /opt/toolchains/dc/kos/addons/lib/dreamcast/libSDL.a /usr/lib/ && \
cp include/* /usr/include/SDL/
- name: Download spawn.mpq
run: |
curl -LO https://github.com/diasurgical/devilutionx-assets/releases/download/v4/spawn.mpq
- name: Download fonts.mpq
run: |
curl -LO https://github.com/diasurgical/devilutionx-assets/releases/download/v4/fonts.mpq
- name: Configure CMake
run: |
source /opt/toolchains/dc/kos/environ.sh && \
#uncomment when using packed mpq or save files
#without this, cmake can't find the kos-ports bzip2 & zlib libraries
export CMAKE_PREFIX_PATH=/opt/toolchains/dc/kos-ports/libbz2/inst/:/opt/toolchains/dc/kos-ports/zlib/inst/ && \
kos-cmake \
-S . \
-DCMAKE_BUILD_TYPE=Release \
-B build
- name: Build DevilutionX
run: |
# patches libfmt to support long double
# patch build/_deps/libfmt-src/include/fmt/format.h -l -p0 < libfmt-long-double.patch
source /opt/toolchains/dc/kos/environ.sh && cd build && kos-make
- name: Generate .cdi
run: |
source /opt/toolchains/dc/kos/environ.sh && \
mv spawn.mpq build/data/ && \
mv fonts.mpq build/data/fonts/ && \
mkdcdisc -e build/devilutionx.elf -o build/devilutionx.cdi --name 'Diablo 1' -d build/data/
- name: Prepare elf package
run: rm build/data/spawn.mpq && rm build/data/fonts/fonts.mpq
- name: Upload .elf Package
if: ${{ !env.ACT }}
uses: actions/upload-artifact@v4
with:
name: devilutionx
path: |
build/data
build/devilutionx.elf
- name: Upload .cdi Package
if: ${{ !env.ACT }}
uses: actions/upload-artifact@v4
with:
name: devilutionx.cdi
path: ./build/devilutionx.cdi
- name: Prepare Releases
if: ${{ github.event_name == 'release' && !env.ACT }}
run: |
apk add zip && \
cd build && \
zip -r devilutionx-dreamcast.zip data/ devilutionx.elf && \
zip -r devilutionx-dreamcast.cdi.zip devilutionx.cdi
- name: Update Release .cdi
if: ${{ github.event_name == 'release' && !env.ACT }}
uses: svenstaro/upload-release-action@v2
with:
file: ./build/devilutionx-dreamcast.cdi.zip
overwrite: true
- name: Update Release .elf
if: ${{ github.event_name == 'release' && !env.ACT }}
uses: svenstaro/upload-release-action@v2
with:
file: ./build/devilutionx-dreamcast.zip
overwrite: true
...