Browse Source

[ci] Build macOS universal binaries (#11572)

* start messing

* upd

* Build universal binary before testing

* separate job

* Update macos ocaml version, fix warnings
RblSb 1 year ago
parent
commit
e646e6f182

+ 77 - 29
.github/workflows/main.yml

@@ -24,7 +24,7 @@ jobs:
           rm C:\msys64\usr\bin\bash.exe
           rm C:\msys64\usr\bin\bash.exe
 
 
       - name: choco install nsis
       - name: choco install nsis
-        uses: nick-invision/retry@v2
+        uses: nick-invision/retry@v3
         with:
         with:
           timeout_minutes: 10
           timeout_minutes: 10
           max_attempts: 10
           max_attempts: 10
@@ -114,7 +114,7 @@ jobs:
           [ $(ls -1 out | wc -l) -eq "3" ]
           [ $(ls -1 out | wc -l) -eq "3" ]
 
 
       - name: Upload artifact
       - name: Upload artifact
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         with:
         with:
           name: win${{env.ARCH}}Binaries
           name: win${{env.ARCH}}Binaries
           path: out
           path: out
@@ -136,7 +136,7 @@ jobs:
 
 
       - name: Cache opam
       - name: Cache opam
         id: cache-opam
         id: cache-opam
-        uses: actions/cache@v3.0.11
+        uses: actions/cache@v4
         with:
         with:
           path: ~/.opam/
           path: ~/.opam/
           key: ${{ runner.os }}-${{ matrix.ocaml }}-${{ hashFiles('./haxe.opam', './libs/') }}
           key: ${{ runner.os }}-${{ matrix.ocaml }}-${{ hashFiles('./haxe.opam', './libs/') }}
@@ -213,13 +213,13 @@ jobs:
           EOL
           EOL
 
 
       - name: Upload artifact
       - name: Upload artifact
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         with:
         with:
           name: linuxBinaries${{ (matrix.ocaml == '5.0.0' && '_ocaml5') || '' }}
           name: linuxBinaries${{ (matrix.ocaml == '5.0.0' && '_ocaml5') || '' }}
           path: out
           path: out
 
 
       - name: Upload xmldoc artifact
       - name: Upload xmldoc artifact
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         if: matrix.ocaml == '4.08.1'
         if: matrix.ocaml == '4.08.1'
         with:
         with:
           name: xmldoc
           name: xmldoc
@@ -251,7 +251,7 @@ jobs:
       - uses: actions/checkout@main
       - uses: actions/checkout@main
         with:
         with:
           submodules: recursive
           submodules: recursive
-      - uses: actions/download-artifact@v3
+      - uses: actions/download-artifact@v4
         with:
         with:
           name: linuxBinaries${{ (matrix.ocaml == '5.0.0' && '_ocaml5') || '' }}
           name: linuxBinaries${{ (matrix.ocaml == '5.0.0' && '_ocaml5') || '' }}
           path: linuxBinaries
           path: linuxBinaries
@@ -321,13 +321,13 @@ jobs:
         with:
         with:
           submodules: recursive
           submodules: recursive
 
 
-      - uses: actions/download-artifact@v3
+      - uses: actions/download-artifact@v4
         with:
         with:
           name: linuxBinaries
           name: linuxBinaries
           path: linuxBinaries
           path: linuxBinaries
 
 
       - name: Download xmldoc artifact
       - name: Download xmldoc artifact
-        uses: actions/download-artifact@v3
+        uses: actions/download-artifact@v4
         with:
         with:
           name: xmldoc
           name: xmldoc
           path: xmldoc
           path: xmldoc
@@ -396,7 +396,7 @@ jobs:
       FORCE_COLOR: 1
       FORCE_COLOR: 1
     steps:
     steps:
       - name: Login to GitHub Container Registry
       - name: Login to GitHub Container Registry
-        uses: docker/login-action@v2
+        uses: docker/login-action@v3
         with:
         with:
           registry: ghcr.io
           registry: ghcr.io
           username: ${{ github.actor }}
           username: ${{ github.actor }}
@@ -407,7 +407,7 @@ jobs:
 
 
       - name: Set up QEMU
       - name: Set up QEMU
         id: qemu
         id: qemu
-        uses: docker/setup-qemu-action@v2
+        uses: docker/setup-qemu-action@v3
         with:
         with:
             image: tonistiigi/binfmt:latest
             image: tonistiigi/binfmt:latest
             platforms: all
             platforms: all
@@ -439,17 +439,23 @@ jobs:
           EARTHLY_REMOTE_CACHE: "ghcr.io/${{env.CONTAINER_REG}}_cache:build-${{env.CONTAINER_TAG}}-arm64"
           EARTHLY_REMOTE_CACHE: "ghcr.io/${{env.CONTAINER_REG}}_cache:build-${{env.CONTAINER_TAG}}-arm64"
 
 
       - name: Upload artifact
       - name: Upload artifact
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         with:
         with:
           name: linuxArm64Binaries
           name: linuxArm64Binaries
           path: out/linux/arm64
           path: out/linux/arm64
 
 
   mac-build:
   mac-build:
-    runs-on: macos-latest
+    strategy:
+      fail-fast: false
+      matrix:
+        os: [macos-latest, macos-14]
+    runs-on: ${{ matrix.os }}
     env:
     env:
       PLATFORM: mac
       PLATFORM: mac
       OPAMYES: 1
       OPAMYES: 1
       MACOSX_DEPLOYMENT_TARGET: 10.13
       MACOSX_DEPLOYMENT_TARGET: 10.13
+      OCAML_VERSION: 5.1.1
+      CTYPES: 0.21.1
     steps:
     steps:
       - uses: actions/checkout@main
       - uses: actions/checkout@main
         with:
         with:
@@ -457,10 +463,10 @@ jobs:
 
 
       - name: Cache opam
       - name: Cache opam
         id: cache-opam
         id: cache-opam
-        uses: actions/cache@v3.0.11
+        uses: actions/cache@v4
         with:
         with:
           path: ~/.opam/
           path: ~/.opam/
-          key: ${{ runner.os }}-${{ hashFiles('./haxe.opam', './libs/') }}
+          key: ${{ matrix.os }}-${{ hashFiles('./haxe.opam', './libs/') }}
 
 
       - name: Install Neko from S3
       - name: Install Neko from S3
         run: |
         run: |
@@ -494,16 +500,16 @@ jobs:
           curl -L https://github.com/madler/zlib/releases/download/v$ZLIB_VERSION/zlib-$ZLIB_VERSION.tar.gz | tar xz
           curl -L https://github.com/madler/zlib/releases/download/v$ZLIB_VERSION/zlib-$ZLIB_VERSION.tar.gz | tar xz
           cd zlib-$ZLIB_VERSION
           cd zlib-$ZLIB_VERSION
           ./configure
           ./configure
-          make && make install
+          sudo make && sudo make install
           cd ..
           cd ..
           curl -L https://github.com/ARMmbed/mbedtls/archive/v$MBEDTLS_VERSION.tar.gz | tar xz
           curl -L https://github.com/ARMmbed/mbedtls/archive/v$MBEDTLS_VERSION.tar.gz | tar xz
           cd mbedtls-$MBEDTLS_VERSION
           cd mbedtls-$MBEDTLS_VERSION
-          make && make install
+          sudo make && sudo make install
           cd ..
           cd ..
           curl -L https://github.com/PCRE2Project/pcre2/releases/download/pcre2-$PCRE2_VERSION/pcre2-$PCRE2_VERSION.tar.gz | tar xz
           curl -L https://github.com/PCRE2Project/pcre2/releases/download/pcre2-$PCRE2_VERSION/pcre2-$PCRE2_VERSION.tar.gz | tar xz
           cd pcre2-$PCRE2_VERSION
           cd pcre2-$PCRE2_VERSION
           ./configure --enable-unicode --enable-pcre2-8 --enable-pcre2-16 --enable-pcre2-32 --enable-unicode-properties --enable-pcre2grep-libz --enable-pcre2grep-libbz2 --enable-jit
           ./configure --enable-unicode --enable-pcre2-8 --enable-pcre2-16 --enable-pcre2-32 --enable-unicode-properties --enable-pcre2grep-libz --enable-pcre2grep-libbz2 --enable-jit
-          make && make install
+          sudo make && sudo make install
           cd ..
           cd ..
 
 
       - name: Install OCaml libraries
       - name: Install OCaml libraries
@@ -512,10 +518,10 @@ jobs:
           set -ex
           set -ex
           opam init # --disable-sandboxing
           opam init # --disable-sandboxing
           opam update
           opam update
-          opam switch create 4.08.1
+          opam switch create ${{env.OCAML_VERSION}}
           eval $(opam env)
           eval $(opam env)
           opam env
           opam env
-          opam pin add ctypes 0.17.1 --yes
+          opam pin add ctypes ${{env.CTYPES}} --yes
           opam pin add haxe . --no-action
           opam pin add haxe . --no-action
           opam install haxe --deps-only --assume-depexts
           opam install haxe --deps-only --assume-depexts
           opam list
           opam list
@@ -536,10 +542,18 @@ jobs:
           otool -L ./haxe
           otool -L ./haxe
           otool -L ./haxelib
           otool -L ./haxelib
 
 
-      - name: Upload artifact
-        uses: actions/upload-artifact@v3
+      - name: Upload artifact (x64)
+        if: matrix.os == 'macos-latest'
+        uses: actions/upload-artifact@v4
         with:
         with:
-          name: macBinaries
+          name: macX64Binaries
+          path: out
+
+      - name: Upload artifact (arm)
+        if: matrix.os == 'macos-14'
+        uses: actions/upload-artifact@v4
+        with:
+          name: macArmBinaries
           path: out
           path: out
 
 
 
 
@@ -561,7 +575,7 @@ jobs:
       - uses: actions/checkout@main
       - uses: actions/checkout@main
         with:
         with:
           submodules: recursive
           submodules: recursive
-      - uses: actions/download-artifact@v3
+      - uses: actions/download-artifact@v4
         with:
         with:
           name: win${{env.ARCH}}Binaries
           name: win${{env.ARCH}}Binaries
           path: win${{env.ARCH}}Binaries
           path: win${{env.ARCH}}Binaries
@@ -578,7 +592,7 @@ jobs:
       - name: Print Neko version
       - name: Print Neko version
         run: neko -version 2>&1
         run: neko -version 2>&1
 
 
-      - uses: actions/setup-node@v3
+      - uses: actions/setup-node@v4
         with:
         with:
           node-version: 18.17.1
           node-version: 18.17.1
 
 
@@ -639,9 +653,43 @@ jobs:
         working-directory: ${{github.workspace}}/tests
         working-directory: ${{github.workspace}}/tests
 
 
 
 
-  mac-test:
+  mac-build-universal:
     needs: mac-build
     needs: mac-build
     runs-on: macos-latest
     runs-on: macos-latest
+    steps:
+      - name: Checkout the repository
+        uses: actions/checkout@main
+      - uses: actions/download-artifact@v4
+        with:
+          name: macX64Binaries
+          path: macX64Binaries
+      - uses: actions/download-artifact@v4
+        with:
+          name: macArmBinaries
+          path: macArmBinaries
+
+      - name: Make universal binary
+        run: |
+          set -ex
+          tar -xf macX64Binaries/*_bin.tar.gz -C macX64Binaries --strip-components=1
+          tar -xf macArmBinaries/*_bin.tar.gz -C macArmBinaries --strip-components=1
+          lipo -create -output haxe macX64Binaries/haxe macArmBinaries/haxe
+          # there is only x64 haxelib
+          mv macX64Binaries/haxelib .
+          make -s package_unix package_installer_mac
+          ls -l out
+          otool -L ./haxe
+          otool -L ./haxelib
+
+      - name: Upload artifact (universal)
+        uses: actions/upload-artifact@v4
+        with:
+          name: macBinaries
+          path: out
+
+  mac-test:
+    needs: mac-build-universal
+    runs-on: macos-latest
     env:
     env:
       PLATFORM: mac
       PLATFORM: mac
       TEST: ${{matrix.target}}
       TEST: ${{matrix.target}}
@@ -658,7 +706,7 @@ jobs:
       - uses: actions/checkout@main
       - uses: actions/checkout@main
         with:
         with:
           submodules: recursive
           submodules: recursive
-      - uses: actions/download-artifact@v3
+      - uses: actions/download-artifact@v4
         with:
         with:
           name: macBinaries
           name: macBinaries
           path: macBinaries
           path: macBinaries
@@ -726,7 +774,7 @@ jobs:
         uses: actions/checkout@main
         uses: actions/checkout@main
 
 
       - name: Download build artifacts
       - name: Download build artifacts
-        uses: actions/download-artifact@v3
+        uses: actions/download-artifact@v4
 
 
       - name: Install awscli
       - name: Install awscli
         run: |
         run: |
@@ -795,7 +843,7 @@ jobs:
           sudo apt-get install -qqy libc6
           sudo apt-get install -qqy libc6
 
 
       - name: Download Haxe
       - name: Download Haxe
-        uses: actions/download-artifact@v3
+        uses: actions/download-artifact@v4
         with:
         with:
           name: linuxBinaries
           name: linuxBinaries
           path: linuxBinaries
           path: linuxBinaries
@@ -811,7 +859,7 @@ jobs:
           sudo ln -s `pwd`/linuxBinaries/std /usr/local/share/haxe/std
           sudo ln -s `pwd`/linuxBinaries/std /usr/local/share/haxe/std
 
 
       - name: Download xmldoc artifact
       - name: Download xmldoc artifact
-        uses: actions/download-artifact@v3
+        uses: actions/download-artifact@v4
         with:
         with:
           name: xmldoc
           name: xmldoc
           path: xmldoc
           path: xmldoc

+ 16 - 8
extra/github-actions/build-mac.yml

@@ -13,16 +13,16 @@
     curl -L https://github.com/madler/zlib/releases/download/v$ZLIB_VERSION/zlib-$ZLIB_VERSION.tar.gz | tar xz
     curl -L https://github.com/madler/zlib/releases/download/v$ZLIB_VERSION/zlib-$ZLIB_VERSION.tar.gz | tar xz
     cd zlib-$ZLIB_VERSION
     cd zlib-$ZLIB_VERSION
     ./configure
     ./configure
-    make && make install
+    sudo make && sudo make install
     cd ..
     cd ..
     curl -L https://github.com/ARMmbed/mbedtls/archive/v$MBEDTLS_VERSION.tar.gz | tar xz
     curl -L https://github.com/ARMmbed/mbedtls/archive/v$MBEDTLS_VERSION.tar.gz | tar xz
     cd mbedtls-$MBEDTLS_VERSION
     cd mbedtls-$MBEDTLS_VERSION
-    make && make install
+    sudo make && sudo make install
     cd ..
     cd ..
     curl -L https://github.com/PCRE2Project/pcre2/releases/download/pcre2-$PCRE2_VERSION/pcre2-$PCRE2_VERSION.tar.gz | tar xz
     curl -L https://github.com/PCRE2Project/pcre2/releases/download/pcre2-$PCRE2_VERSION/pcre2-$PCRE2_VERSION.tar.gz | tar xz
     cd pcre2-$PCRE2_VERSION
     cd pcre2-$PCRE2_VERSION
     ./configure --enable-unicode --enable-pcre2-8 --enable-pcre2-16 --enable-pcre2-32 --enable-unicode-properties --enable-pcre2grep-libz --enable-pcre2grep-libbz2 --enable-jit
     ./configure --enable-unicode --enable-pcre2-8 --enable-pcre2-16 --enable-pcre2-32 --enable-unicode-properties --enable-pcre2grep-libz --enable-pcre2grep-libbz2 --enable-jit
-    make && make install
+    sudo make && sudo make install
     cd ..
     cd ..
 
 
 - name: Install OCaml libraries
 - name: Install OCaml libraries
@@ -31,10 +31,10 @@
     set -ex
     set -ex
     opam init # --disable-sandboxing
     opam init # --disable-sandboxing
     opam update
     opam update
-    opam switch create 4.08.1
+    opam switch create ${{env.OCAML_VERSION}}
     eval $(opam env)
     eval $(opam env)
     opam env
     opam env
-    opam pin add ctypes 0.17.1 --yes
+    opam pin add ctypes ${{env.CTYPES}} --yes
     opam pin add haxe . --no-action
     opam pin add haxe . --no-action
     opam install haxe --deps-only --assume-depexts
     opam install haxe --deps-only --assume-depexts
     opam list
     opam list
@@ -55,8 +55,16 @@
     otool -L ./haxe
     otool -L ./haxe
     otool -L ./haxelib
     otool -L ./haxelib
 
 
-- name: Upload artifact
-  uses: actions/upload-artifact@v3
+- name: Upload artifact (x64)
+  if: matrix.os == 'macos-latest'
+  uses: actions/upload-artifact@v4
   with:
   with:
-    name: macBinaries
+    name: macX64Binaries
+    path: out
+
+- name: Upload artifact (arm)
+  if: matrix.os == 'macos-14'
+  uses: actions/upload-artifact@v4
+  with:
+    name: macArmBinaries
     path: out
     path: out

+ 1 - 1
extra/github-actions/build-windows.yml

@@ -34,7 +34,7 @@
     [ $(ls -1 out | wc -l) -eq "3" ]
     [ $(ls -1 out | wc -l) -eq "3" ]
 
 
 - name: Upload artifact
 - name: Upload artifact
-  uses: actions/upload-artifact@v3
+  uses: actions/upload-artifact@v4
   with:
   with:
     name: win${{env.ARCH}}Binaries
     name: win${{env.ARCH}}Binaries
     path: out
     path: out

+ 1 - 1
extra/github-actions/install-nsis.yml

@@ -1,5 +1,5 @@
 - name: choco install nsis
 - name: choco install nsis
-  uses: nick-invision/retry@v2
+  uses: nick-invision/retry@v3
   with:
   with:
     timeout_minutes: 10
     timeout_minutes: 10
     max_attempts: 10
     max_attempts: 10

+ 1 - 1
extra/github-actions/test-windows.yml

@@ -1,4 +1,4 @@
-- uses: actions/setup-node@v3
+- uses: actions/setup-node@v4
   with:
   with:
     node-version: 18.17.1
     node-version: 18.17.1
 
 

+ 58 - 18
extra/github-actions/workflows/main.yml

@@ -44,7 +44,7 @@ jobs:
 
 
       - name: Cache opam
       - name: Cache opam
         id: cache-opam
         id: cache-opam
-        uses: actions/cache@v3.0.11
+        uses: actions/cache@v4
         with:
         with:
           path: ~/.opam/
           path: ~/.opam/
           key: ${{ runner.os }}-${{ matrix.ocaml }}-${{ hashFiles('./haxe.opam', './libs/') }}
           key: ${{ runner.os }}-${{ matrix.ocaml }}-${{ hashFiles('./haxe.opam', './libs/') }}
@@ -105,13 +105,13 @@ jobs:
           EOL
           EOL
 
 
       - name: Upload artifact
       - name: Upload artifact
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         with:
         with:
           name: linuxBinaries${{ (matrix.ocaml == '5.0.0' && '_ocaml5') || '' }}
           name: linuxBinaries${{ (matrix.ocaml == '5.0.0' && '_ocaml5') || '' }}
           path: out
           path: out
 
 
       - name: Upload xmldoc artifact
       - name: Upload xmldoc artifact
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         if: matrix.ocaml == '4.08.1'
         if: matrix.ocaml == '4.08.1'
         with:
         with:
           name: xmldoc
           name: xmldoc
@@ -143,7 +143,7 @@ jobs:
       - uses: actions/checkout@main
       - uses: actions/checkout@main
         with:
         with:
           submodules: recursive
           submodules: recursive
-      - uses: actions/download-artifact@v3
+      - uses: actions/download-artifact@v4
         with:
         with:
           name: linuxBinaries${{ (matrix.ocaml == '5.0.0' && '_ocaml5') || '' }}
           name: linuxBinaries${{ (matrix.ocaml == '5.0.0' && '_ocaml5') || '' }}
           path: linuxBinaries
           path: linuxBinaries
@@ -197,13 +197,13 @@ jobs:
         with:
         with:
           submodules: recursive
           submodules: recursive
 
 
-      - uses: actions/download-artifact@v3
+      - uses: actions/download-artifact@v4
         with:
         with:
           name: linuxBinaries
           name: linuxBinaries
           path: linuxBinaries
           path: linuxBinaries
 
 
       - name: Download xmldoc artifact
       - name: Download xmldoc artifact
-        uses: actions/download-artifact@v3
+        uses: actions/download-artifact@v4
         with:
         with:
           name: xmldoc
           name: xmldoc
           path: xmldoc
           path: xmldoc
@@ -256,7 +256,7 @@ jobs:
       FORCE_COLOR: 1
       FORCE_COLOR: 1
     steps:
     steps:
       - name: Login to GitHub Container Registry
       - name: Login to GitHub Container Registry
-        uses: docker/login-action@v2
+        uses: docker/login-action@v3
         with:
         with:
           registry: ghcr.io
           registry: ghcr.io
           username: ${{ github.actor }}
           username: ${{ github.actor }}
@@ -267,7 +267,7 @@ jobs:
 
 
       - name: Set up QEMU
       - name: Set up QEMU
         id: qemu
         id: qemu
-        uses: docker/setup-qemu-action@v2
+        uses: docker/setup-qemu-action@v3
         with:
         with:
             image: tonistiigi/binfmt:latest
             image: tonistiigi/binfmt:latest
             platforms: all
             platforms: all
@@ -299,17 +299,23 @@ jobs:
           EARTHLY_REMOTE_CACHE: "ghcr.io/${{env.CONTAINER_REG}}_cache:build-${{env.CONTAINER_TAG}}-arm64"
           EARTHLY_REMOTE_CACHE: "ghcr.io/${{env.CONTAINER_REG}}_cache:build-${{env.CONTAINER_TAG}}-arm64"
 
 
       - name: Upload artifact
       - name: Upload artifact
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         with:
         with:
           name: linuxArm64Binaries
           name: linuxArm64Binaries
           path: out/linux/arm64
           path: out/linux/arm64
 
 
   mac-build:
   mac-build:
-    runs-on: macos-latest
+    strategy:
+      fail-fast: false
+      matrix:
+        os: [macos-latest, macos-14]
+    runs-on: ${{ matrix.os }}
     env:
     env:
       PLATFORM: mac
       PLATFORM: mac
       OPAMYES: 1
       OPAMYES: 1
       MACOSX_DEPLOYMENT_TARGET: 10.13
       MACOSX_DEPLOYMENT_TARGET: 10.13
+      OCAML_VERSION: 5.1.1
+      CTYPES: 0.21.1
     steps:
     steps:
       - uses: actions/checkout@main
       - uses: actions/checkout@main
         with:
         with:
@@ -317,10 +323,10 @@ jobs:
 
 
       - name: Cache opam
       - name: Cache opam
         id: cache-opam
         id: cache-opam
-        uses: actions/cache@v3.0.11
+        uses: actions/cache@v4
         with:
         with:
           path: ~/.opam/
           path: ~/.opam/
-          key: ${{ runner.os }}-${{ hashFiles('./haxe.opam', './libs/') }}
+          key: ${{ matrix.os }}-${{ hashFiles('./haxe.opam', './libs/') }}
 
 
       @import install-neko-unix.yml
       @import install-neko-unix.yml
       @import build-mac.yml
       @import build-mac.yml
@@ -343,7 +349,7 @@ jobs:
       - uses: actions/checkout@main
       - uses: actions/checkout@main
         with:
         with:
           submodules: recursive
           submodules: recursive
-      - uses: actions/download-artifact@v3
+      - uses: actions/download-artifact@v4
         with:
         with:
           name: win${{env.ARCH}}Binaries
           name: win${{env.ARCH}}Binaries
           path: win${{env.ARCH}}Binaries
           path: win${{env.ARCH}}Binaries
@@ -351,9 +357,43 @@ jobs:
       @import install-neko-windows.yml
       @import install-neko-windows.yml
       @import test-windows.yml
       @import test-windows.yml
 
 
-  mac-test:
+  mac-build-universal:
     needs: mac-build
     needs: mac-build
     runs-on: macos-latest
     runs-on: macos-latest
+    steps:
+      - name: Checkout the repository
+        uses: actions/checkout@main
+      - uses: actions/download-artifact@v4
+        with:
+          name: macX64Binaries
+          path: macX64Binaries
+      - uses: actions/download-artifact@v4
+        with:
+          name: macArmBinaries
+          path: macArmBinaries
+
+      - name: Make universal binary
+        run: |
+          set -ex
+          tar -xf macX64Binaries/*_bin.tar.gz -C macX64Binaries --strip-components=1
+          tar -xf macArmBinaries/*_bin.tar.gz -C macArmBinaries --strip-components=1
+          lipo -create -output haxe macX64Binaries/haxe macArmBinaries/haxe
+          # there is only x64 haxelib
+          mv macX64Binaries/haxelib .
+          make -s package_unix package_installer_mac
+          ls -l out
+          otool -L ./haxe
+          otool -L ./haxelib
+
+      - name: Upload artifact (universal)
+        uses: actions/upload-artifact@v4
+        with:
+          name: macBinaries
+          path: out
+
+  mac-test:
+    needs: mac-build-universal
+    runs-on: macos-latest
     env:
     env:
       PLATFORM: mac
       PLATFORM: mac
       TEST: ${{matrix.target}}
       TEST: ${{matrix.target}}
@@ -370,7 +410,7 @@ jobs:
       - uses: actions/checkout@main
       - uses: actions/checkout@main
         with:
         with:
           submodules: recursive
           submodules: recursive
-      - uses: actions/download-artifact@v3
+      - uses: actions/download-artifact@v4
         with:
         with:
           name: macBinaries
           name: macBinaries
           path: macBinaries
           path: macBinaries
@@ -390,7 +430,7 @@ jobs:
         uses: actions/checkout@main
         uses: actions/checkout@main
 
 
       - name: Download build artifacts
       - name: Download build artifacts
-        uses: actions/download-artifact@v3
+        uses: actions/download-artifact@v4
 
 
       - name: Install awscli
       - name: Install awscli
         run: |
         run: |
@@ -459,7 +499,7 @@ jobs:
           sudo apt-get install -qqy libc6
           sudo apt-get install -qqy libc6
 
 
       - name: Download Haxe
       - name: Download Haxe
-        uses: actions/download-artifact@v3
+        uses: actions/download-artifact@v4
         with:
         with:
           name: linuxBinaries
           name: linuxBinaries
           path: linuxBinaries
           path: linuxBinaries
@@ -475,7 +515,7 @@ jobs:
           sudo ln -s `pwd`/linuxBinaries/std /usr/local/share/haxe/std
           sudo ln -s `pwd`/linuxBinaries/std /usr/local/share/haxe/std
 
 
       - name: Download xmldoc artifact
       - name: Download xmldoc artifact
-        uses: actions/download-artifact@v3
+        uses: actions/download-artifact@v4
         with:
         with:
           name: xmldoc
           name: xmldoc
           path: xmldoc
           path: xmldoc