diff --git a/.github/build.sh b/.github/build.sh index 5f4fa2c03..e6baced39 100755 --- a/.github/build.sh +++ b/.github/build.sh @@ -36,7 +36,7 @@ BUILD_INIT_BAT fi other_flags= -bin_postfix= +bin_suffix= static_flag= if [ $STATIC_DYNAMIC == "static" ]; then static_flag=-Dstatic=prebuilt @@ -49,19 +49,20 @@ if [ $PLATFORM_SHORT == "lin" ]; then # pthread_create, thanks to weak symbols in libstdc++.so (or something). See # https://gcc.gnu.org/legacy-ml/gcc-help/2017-03/msg00081.html other_flags+=$'\t-Db_asneeded=false\t-Dcpp_link_args=-Wl,--no-as-needed' + if [ $STATIC_DYNAMIC == "static" ]; then + other_flags+=$'\t-Dbuild_render=true\t-Dbuild_font=true' + fi fi if [ $PLATFORM_SHORT == "win" ]; then - bin_postfix=$bin_postfix.exe + bin_suffix=$bin_suffix.exe fi if echo $RELTYPECFG | base64 -d | grep snapshot; then other_flags+=$'\t-Dupdate_server=starcatcher.us/TPT' fi -meson -Dbuildtype=release -Dbuild_render=true -Dbuild_font=true -Db_pie=false -Db_staticpic=false -Db_lto=true $static_flag -Dinstall_check=true $other_flags `echo $RELTYPECFG | base64 -d` build +meson -Dbuildtype=release -Db_pie=false -Db_staticpic=false -Db_lto=true $static_flag -Dinstall_check=true $other_flags `echo $RELTYPECFG | base64 -d` build cd build ninja if [ $PLATFORM_SHORT == "lin" ] || [ $PLATFORM_SHORT == "mac" ]; then - strip powder$bin_postfix render$bin_postfix font$bin_postfix + strip powder$bin_suffix fi -7z a ../powder.zip powder$bin_postfix render$bin_postfix font$bin_postfix -cd .. -7z a powder.zip README.md LICENSE +cp powder$bin_suffix .. diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 8d42b119d..e9f031653 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -44,10 +44,13 @@ jobs: include: - platform_short: lin os: ubuntu-latest + suffix: '' - platform_short: mac os: macos-latest + suffix: '' - platform_short: win os: windows-latest + suffix: '.exe' steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 @@ -73,11 +76,11 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.get_release_info.outputs.upload_url }} - asset_path: powder.zip - asset_name: powder-${{ steps.get_type.outputs.NAME }}-${{ matrix.platform_short }}64.zip + asset_path: powder${{ matrix.suffix }} + asset_name: powder-${{ steps.get_type.outputs.NAME }}-${{ matrix.platform_short }}64${{ matrix.suffix }} asset_content_type: application/zip - uses: actions/upload-artifact@v2 if: steps.get_type.outputs.TYPE == 'dev' && matrix.static_dynamic == 'static' with: - path: powder.zip - name: powder-${{ steps.get_type.outputs.NAME }}-${{ matrix.static_dynamic }}-${{ matrix.platform_short }}64.zip + path: powder${{ matrix.suffix }} + name: powder-${{ steps.get_type.outputs.NAME }}-${{ matrix.static_dynamic }}-${{ matrix.platform_short }}64${{ matrix.suffix }}