diff --git a/.github/workflows/prebuild.yml b/.github/workflows/prebuild.yml index c3e7c6466a..16b3e03680 100644 --- a/.github/workflows/prebuild.yml +++ b/.github/workflows/prebuild.yml @@ -9,7 +9,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-11, windows-2022] + os: [macos-11, ubuntu-22.04, windows-2022] steps: - if: matrix.os == 'windows-2022' @@ -38,23 +38,20 @@ jobs: cmake --build . --target install python3 ../scripts/bundle.py mac release done - # - if: matrix.os == 'macos-11' - # name: Build - Debug (MacOS) - # run: | - # rm -r builddir - # rm -r openssl/builddir - - # cd openssl - # meson setup builddir --buildtype=debug - # meson compile -C builddir - # cd .. - # mkdir -p builddir - # cd builddir - # cp -r ../openssl/subprojects/openssl-3.0.2/generated-config/archs/darwin64-x86_64-cc/asm/include ../openssl/subprojects/openssl-3.0.2 - # cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=bundle -DENABLE_CRYPTO=ON -DBUILD_SHARED_LIBS=OFF - # cmake --build . --config Debug -- -j8 - # cmake --build . --target install - # python3 ../scripts/bundle.py debug done + - if: matrix.os == 'ubuntu-22.04' + name: Build - Release (Linux) + run: | + cd openssl + meson setup builddir --buildtype=release + meson compile -C builddir + cd .. + mkdir -p builddir + cd builddir + cp -r ../openssl/subprojects/openssl-3.0.2/generated-config/archs/linux-x86_64/asm/include ../openssl/subprojects/openssl-3.0.2 + cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=bundle -DENABLE_CRYPTO=ON -DBUILD_SHARED_LIBS=OFF + cmake --build . --config Release -- -j8 + cmake --build . --target install + python3 ../scripts/bundle.py linux release done - if: matrix.os == 'windows-2022' name: Build - Release /MT (Windows) @@ -89,42 +86,6 @@ jobs: cmake --build . --target install python3 ../scripts/bundle.py win release_md done - # - if: matrix.os == 'windows-2022' - # name: Build - Debug /MT (Windows) - # run: | - # rm -r builddir - # rm -r openssl/builddir - - # cd openssl - # meson setup builddir --buildtype=debug -Dmt=enabled - # meson compile -C builddir - # cd .. - # mkdir -force builddir - # cd builddir - # cp -r -force ../openssl/subprojects/openssl-3.0.2/generated-config/archs/VC-WIN64A/no-asm/include ../openssl/subprojects/openssl-3.0.2 - # cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=bundle -DENABLE_CRYPTO=ON -DBUILD_SHARED_LIBS=OFF -DPOCO_MT=ON - # cmake --build . --config Debug - # cmake --build . --target install - # python3 ../scripts/bundle.py debug_mt - - # - if: matrix.os == 'windows-2022' - # name: Build - Debug /MD (Windows) - # run: | - # rm -r builddir - # rm -r openssl/builddir - - # cd openssl - # meson setup builddir --buildtype=debug -Dmt=disabled - # meson compile -C builddir - # cd .. - # mkdir -force builddir - # cd builddir - # cp -r -force ../openssl/subprojects/openssl-3.0.2/generated-config/archs/VC-WIN64A/no-asm/include ../openssl/subprojects/openssl-3.0.2 - # cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=bundle -DENABLE_CRYPTO=ON -DBUILD_SHARED_LIBS=OFF -DPOCO_MT=OFF - # cmake --build . --config Debug - # cmake --build . --target install - # python3 ../scripts/bundle.py debug_md done - - name: Upload uses: ncipollo/release-action@v1.10.0 with: diff --git a/openssl/meson.build b/openssl/meson.build index 339c9a3db5..a84e0e2918 100644 --- a/openssl/meson.build +++ b/openssl/meson.build @@ -11,7 +11,7 @@ if host_machine.system() == 'windows' else add_global_arguments('/MD', language: 'c') endif -else +elif host_machine.system() == 'darwin' add_global_arguments('-mmacosx-version-min=10.15', language: 'c') endif diff --git a/scripts/bundle.py b/scripts/bundle.py index 3c850c14b8..59d56edca1 100644 --- a/scripts/bundle.py +++ b/scripts/bundle.py @@ -69,10 +69,7 @@ # zip -if platform.system() == 'Windows': - bundlezip = curdir + '/poco-win' -else: - bundlezip = curdir + '/poco-mac' +bundlezip = curdir + '/poco-' + opsys if len(sys.argv) > 3: shutil.make_archive(bundlezip, 'zip', bundledir) diff --git a/scripts/patch/globo b/scripts/patch/globo index 4cc20daca1..14771e4f7e 100644 --- a/scripts/patch/globo +++ b/scripts/patch/globo @@ -8,6 +8,9 @@ component = sys.argv[2] if platform.system() == 'Windows': for i in glob.glob('./win/' + config + '/' + component + '/*.obj'): print(i) -else: +elif platform.system() == 'Darwin': for i in glob.glob('./mac/' + config + '/' + component + '/*.o'): print(i) +else: + for i in glob.glob('./linux/' + config + '/' + component + '/*.o'): + print(i) diff --git a/scripts/patch/meson.build b/scripts/patch/meson.build index a4d3e5953c..b60e04ae15 100644 --- a/scripts/patch/meson.build +++ b/scripts/patch/meson.build @@ -11,7 +11,7 @@ if host_machine.system() == 'windows' compile_args: ['-DPOCO_NO_AUTOMATIC_LIBS', '-DPOCO_STATIC', '/wd4127', '/wd4244', '/wd4245'], include_directories: 'win/include' ) -else +elif host_machine.system() == 'darwin' platform = 'mac' config_mt = 'release' config_md = 'release' @@ -20,6 +20,15 @@ else compile_args: ['-Wno-deprecated-declarations', '-Wno-sign-compare'], include_directories: 'mac/include' ) +else + platform = 'linux' + config_mt = 'release' + config_md = 'release' + + poco_dep = declare_dependency( + compile_args: ['-Wno-deprecated-declarations', '-Wno-sign-compare'], + include_directories: 'linux/include' + ) endif cpp = meson.get_compiler('cpp')