From b4e1a689160644aadc7b1a179f3f74ba69470aa3 Mon Sep 17 00:00:00 2001 From: Dadoum Date: Sun, 30 Jul 2023 17:12:05 +0200 Subject: [PATCH] Add debug symbols to GH Actions --- .github/workflows/cmake-cross-compile.yml | 22 +++++++++++++++++----- .github/workflows/cmake-windows.yml | 7 +++++-- .github/workflows/cmake.yml | 20 ++++++++++++++++---- dub.sdl | 6 +++--- 4 files changed, 41 insertions(+), 14 deletions(-) diff --git a/.github/workflows/cmake-cross-compile.yml b/.github/workflows/cmake-cross-compile.yml index 39b1eb2..863a7e9 100644 --- a/.github/workflows/cmake-cross-compile.yml +++ b/.github/workflows/cmake-cross-compile.yml @@ -16,20 +16,26 @@ jobs: submodules: recursive - name: Install dependencies - run: sudo apt-get update && sudo apt-get install -y gdc-12-aarch64-linux-gnu dub libz-dev + run: | + sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa + sudo apt-get update && sudo apt-get install -y gdc-13-aarch64-linux-gnu dub libz-dev - name: Build - run: dub build :anisette-server -b release --compiler=aarch64-linux-gnu-gdc-12 -c "static" + run: dub build :anisette-server -b release --compiler=aarch64-linux-gnu-gdc-13 -c "static" - name: Rename run: mv "${{github.workspace}}/bin/provision_anisette-server" "${{github.workspace}}/bin/anisette-server-aarch64" + - name: Put debug symbols in a separate file + run: eu-strip --strip-debug -f "${{github.workspace}}/bin/anisette-server-aarch64.dbg" "${{github.workspace}}/bin/anisette-server-aarch64" + - uses: actions/upload-artifact@v3 with: name: anisette-server-aarch64 path: | ${{github.workspace}}/bin/anisette-server-aarch64 - + ${{github.workspace}}/bin/anisette-server-aarch64.dbg + build-anisette-server-armv7: runs-on: ubuntu-22.04 @@ -39,16 +45,22 @@ jobs: submodules: recursive - name: Install dependencies - run: sudo apt-get update && sudo apt-get install -y gdc-12-arm-linux-gnueabihf dub libz-dev + run: | + sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa + sudo apt-get update && sudo apt-get install -y gdc-13-arm-linux-gnueabihf dub libz-dev - name: Build - run: dub build :anisette-server -b release --compiler=arm-linux-gnueabihf-gdc-12 -c "static" + run: dub build :anisette-server -b release --compiler=arm-linux-gnueabihf-gdc-13 -c "static" - name: Rename run: mv "${{github.workspace}}/bin/provision_anisette-server" "${{github.workspace}}/bin/anisette-server-armv7" + - name: Put debug symbols in a separate file + run: eu-strip --strip-debug -f "${{github.workspace}}/bin/anisette-server-armv7.dbg" "${{github.workspace}}/bin/anisette-server-armv7" + - uses: actions/upload-artifact@v3 with: name: anisette-server-armv7 path: | ${{github.workspace}}/bin/anisette-server-armv7 + ${{github.workspace}}/bin/anisette-server-armv7.dbg diff --git a/.github/workflows/cmake-windows.yml b/.github/workflows/cmake-windows.yml index 5492eb1..738fd3d 100644 --- a/.github/workflows/cmake-windows.yml +++ b/.github/workflows/cmake-windows.yml @@ -20,13 +20,16 @@ jobs: compiler: ldc-latest - name: Build - run: dub build :anisette-server -b release -c "static" + run: dub build :anisette-server -b release-debug -c "static" - name: Rename - run: mv "${{github.workspace}}/bin/provision_anisette-server.exe" "${{github.workspace}}/bin/anisette-server-x86_64.exe" + run: | + mv "${{github.workspace}}/bin/provision_anisette-server.exe" "${{github.workspace}}/bin/anisette-server-x86_64.exe" + mv "${{github.workspace}}/bin/provision_anisette-server.pdb" "${{github.workspace}}/bin/anisette-server-x86_64.pdb" - uses: actions/upload-artifact@v3 with: name: anisette-server-x86_64 path: | ${{github.workspace}}/bin/anisette-server-x86_64.exe + ${{github.workspace}}/bin/anisette-server-x86_64.pdb diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 9325c3f..8d38d13 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -15,19 +15,25 @@ jobs: submodules: recursive - name: Install dependencies - run: sudo apt-get update && sudo apt-get install -y gdc-12 dub libz-dev + run: | + sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa + sudo apt-get update && sudo apt-get install -y gdc-13 dub libz-dev elfutils - name: Build - run: dub build :anisette-server -b release --compiler=gdc-12 -c "static" + run: dub build :anisette-server -b release --compiler=gdc-13 -c "static" - name: Rename run: mv "${{github.workspace}}/bin/provision_anisette-server" "${{github.workspace}}/bin/anisette-server-x86_64" + - name: Put debug symbols in a separate file + run: eu-strip --strip-debug -f "${{github.workspace}}/bin/anisette-server-x86_64.dbg" "${{github.workspace}}/bin/anisette-server-x86_64" + - uses: actions/upload-artifact@v3 with: name: anisette-server-x86_64 path: | ${{github.workspace}}/bin/anisette-server-x86_64 + ${{github.workspace}}/bin/anisette-server-x86_64.dbg build-anisette-server-i686: runs-on: ubuntu-22.04 @@ -38,17 +44,23 @@ jobs: submodules: recursive - name: Install dependencies - run: sudo apt-get update && sudo apt-get install -y gdc-12-i686-linux-gnu dub libz-dev + run: | + sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa + sudo apt-get update && sudo apt-get install -y gdc-13-i686-linux-gnu dub libz-dev - name: Build - run: dub build :anisette-server -b release --compiler=i686-linux-gnu-gdc-12 -c "static" + run: dub build :anisette-server -b release --compiler=i686-linux-gnu-gdc-13 -c "static" - name: Rename run: mv "${{github.workspace}}/bin/provision_anisette-server" "${{github.workspace}}/bin/anisette-server-i686" + - name: Put debug symbols in a separate file + run: eu-strip --strip-debug -f "${{github.workspace}}/bin/anisette-server-i686.dbg" "${{github.workspace}}/bin/anisette-server-i686" + - uses: actions/upload-artifact@v3 with: name: anisette-server-i686 path: | ${{github.workspace}}/bin/anisette-server-i686 + ${{github.workspace}}/bin/anisette-server-i686.dbg diff --git a/dub.sdl b/dub.sdl index 14c73af..81c1617 100644 --- a/dub.sdl +++ b/dub.sdl @@ -9,8 +9,8 @@ targetPath "bin" sourcePaths "lib" importPaths "lib" -dependency "requests" version="~>2.0.9" -dependency "slf4d" version="~>2.1.1" +dependency "requests" version="~>2" +dependency "slf4d" version="~>2" configuration "plist-d" { dependency "plist" version="~master" @@ -31,7 +31,7 @@ subPackage { sourcePaths "retrieve_headers" dependency "provision" version="*" - lflags "/usr/x86_64-w64-mingw32ucrt/sys-root/mingw/lib/libws2_32.a" "/usr/x86_64-w64-mingw32ucrt/sys-root/mingw/lib/libmincore.a" "/usr/x86_64-w64-mingw32ucrt/sys-root/mingw/lib/libwsock32.a" platform="gdc" + // lflags "/usr/x86_64-w64-mingw32ucrt/sys-root/mingw/lib/libws2_32.a" "/usr/x86_64-w64-mingw32ucrt/sys-root/mingw/lib/libmincore.a" "/usr/x86_64-w64-mingw32ucrt/sys-root/mingw/lib/libwsock32.a" platform="gdc" } subPackage {