Merge pull request #4791 from talregev/TalR/wasm_debug_information

[wasm] Add debug information
This commit is contained in:
Vitalii Koshura 2022-06-16 11:40:17 +02:00 committed by GitHub
commit b16a09c3a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 3 deletions

View File

@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
type: [client]
type: [client, client-debug]
fail-fast: false
steps:
- uses: actions/checkout@v2
@ -52,6 +52,10 @@ jobs:
if: success() && matrix.type == 'client'
run: wasm/ci_configure_client.sh
- name: Configure client as webassembly
if: success() && matrix.type == 'client-debug'
run: wasm/ci_configure_client.sh debug
- name: Make
if: success()
run: wasm/ci_make.sh
@ -70,12 +74,19 @@ jobs:
path: deploy/logs.7z
- name: Prepare artifacts for deploy
if: success() && ! contains(matrix.type, 'libs')
if: success() && ! contains(matrix.type, 'libs') && ! contains(matrix.type, 'debug')
env:
PULL_REQUEST: ${{ github.event.number }}
PULL_REQUEST_SHA: ${{ github.event.pull_request.head.sha }}
run: python ./deploy/prepare_deployment.py wasm_${{ matrix.type }}
- name: Prepare artifacts for debug deploy
if: success() && matrix.type == 'client-debug'
env:
PULL_REQUEST: ${{ github.event.number }}
PULL_REQUEST_SHA: ${{ github.event.pull_request.head.sha }}
run: 7z a -t7z -mx=9 deploy/wasm_${{ matrix.type }}.7z -r0 lib/*.cpp lib/*.h client/*.cpp client/*.h client/boinc_client.html client/boinc_client.js client/boinc_client.wasm
- name: Upload artifacts
uses: actions/upload-artifact@v2
if: ${{ ! contains(matrix.type, 'libs') }}

View File

@ -16,5 +16,13 @@ wasm/update_emsdk.sh
source $EMSDK_ROOT/emsdk_env.sh
wasm/update_emsdk_vcpkg.sh
debug_flags=""
if [ "debug" == "$1" ]; then
export CPPFLAGS="-g3 -fdebug-prefix-map=$PWD=.."
debug_flags="--enable-debug"
echo -e "\e[33mDebug flags: ./configure $debug_flags, CPPFLAGS=$CPPFLAGS\e[0m"
fi
export _libcurl_pc="$VCPKG_DIR/lib/pkgconfig/libcurl.pc"
emconfigure ./configure --enable-wasm --enable-vcpkg --with-libcurl=$VCPKG_DIR --with-ssl=$VCPKG_DIR --disable-server --enable-client --disable-manager
emconfigure ./configure $debug_flags --enable-wasm --enable-vcpkg --with-libcurl=$VCPKG_DIR --with-ssl=$VCPKG_DIR --disable-server --enable-client --disable-manager