]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Added cmake and configure matrix runs for Emscripten.
authorNathan Moinvaziri <nathan@nathanm.com>
Mon, 22 Aug 2022 01:37:14 +0000 (18:37 -0700)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Mon, 5 Dec 2022 22:24:02 +0000 (23:24 +0100)
.github/workflows/cmake.yml
.github/workflows/configure.yml

index d6347079d0ec1891c49cec3347d34d07513ad387..038d8b3b8ed1fc309e7ff7793e99e1c2f8eb478f 100644 (file)
@@ -348,6 +348,11 @@ jobs:
             packages:  ninja-build llvm-11-tools
             gcov-exec: llvm-cov-11 gcov
 
+          - name: Ubuntu Emscripten WASM32
+            os: ubuntu-latest
+            chost: wasm32
+            cmake-args: -DCMAKE_TOOLCHAIN_FILE=${EMSDK}/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DCMAKE_C_COMPILER_TARGET=wasm32 -DCMAKE_CROSSCOMPILING_EMULATOR=${EMSDK_NODE} -DZLIB_COMPAT=ON
+
           - name: Windows MSVC 2022 v143 Win32
             os: windows-latest
             compiler: cl
@@ -473,6 +478,10 @@ jobs:
       env:
         HOMEBREW_NO_INSTALL_CLEANUP: 1
 
+    - name: Install Emscripten
+      if: contains(matrix.name, 'WASM32')
+      uses: mymindstorm/setup-emsdk@v11
+
     - name: Initialize Wine
       # Prevent parallel test jobs from initializing Wine at the same time
       if: contains(matrix.packages, 'wine')
index babdbe617d9e23d86711465036de11959d646266..fb29baf3305aa255ed81eaeb6025848eb6f8d874 100644 (file)
@@ -160,6 +160,14 @@ jobs:
             compiler: gcc
             configure-args: --warn --zlib-compat --static --with-dfltcc-deflate --with-dfltcc-inflate
 
+          - name: Ubuntu Emscripten WASM32
+            os: ubuntu-latest
+            chost: wasm32
+            configure-args: --warn --zlib-compat --static
+            configure-prefix: emconfigure
+            cflags: -static
+            ldflags: -static
+
           - name: macOS GCC Symbol Prefix
             os: macOS-latest
             compiler: gcc-9
@@ -185,11 +193,15 @@ jobs:
         sudo apt-get update
         sudo apt-get install -y ${{ matrix.packages }}
 
+    - name: Install Emscripten
+      if: contains(matrix.name, 'WASM32')
+      uses: mymindstorm/setup-emsdk@v11
+
     - name: Generate project files
       run: |
         mkdir ${{ matrix.build-dir || '.not-used' }}
         cd ${{ matrix.build-dir || '.' }}
-        ${{ matrix.build-src-dir || '.' }}/configure ${{ matrix.configure-args }}
+        ${{ matrix.configure-prefix }} ${{ matrix.build-src-dir || '.' }}/configure ${{ matrix.configure-args }}
       env:
         CC: ${{ matrix.compiler }}
         CFLAGS: ${{ matrix.cflags }}