From 7bd48b6c3e2eeec14d3b85d69b942b0a005046a6 Mon Sep 17 00:00:00 2001 From: Robert Konrad Date: Thu, 8 Aug 2024 21:34:45 +0200 Subject: [PATCH] Rebuild the GitHub workflow --- .github/workflows/main.yml | 47 ++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c379b1d55fc..acaf48fdc39 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,11 +24,11 @@ jobs: rm C:\msys64\usr\bin\bash.exe - name: choco install nsis - uses: nick-invision/retry@v2 + uses: nick-invision/retry@v3 with: timeout_minutes: 10 max_attempts: 10 - command: choco install --no-progress nsis.portable --version 3.02 -y + command: choco install --no-progress nsis.portable --version 3.09 -y - name: choco install things shell: pwsh @@ -158,7 +158,7 @@ jobs: - name: Cache opam id: cache-opam - uses: actions/cache@v3.0.11 + uses: actions/cache@v4 with: path: ~/.opam/ key: ${{ runner.os }}-${{ matrix.ocaml }}-${{ hashFiles('./haxe.opam', './libs/') }} @@ -171,9 +171,11 @@ jobs: tar -xf $RUNNER_TEMP/neko_latest.tar.gz -C $RUNNER_TEMP NEKOPATH=`echo $RUNNER_TEMP/neko-*-*` sudo mkdir -p /usr/local/bin + sudo mkdir -p /usr/local/include sudo mkdir -p /usr/local/lib/neko sudo ln -s $NEKOPATH/{neko,nekoc,nekoml,nekotools} /usr/local/bin/ sudo ln -s $NEKOPATH/libneko.* /usr/local/lib/ + sudo ln -s $NEKOPATH/include/* /usr/local/include/ sudo ln -s $NEKOPATH/*.ndll /usr/local/lib/neko/ echo "NEKOPATH=$NEKOPATH" >> $GITHUB_ENV @@ -260,7 +262,7 @@ jobs: FORCE_COLOR: 1 steps: - name: Login to GitHub Container Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} @@ -271,7 +273,7 @@ jobs: - name: Set up QEMU id: qemu - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 with: image: tonistiigi/binfmt:latest platforms: all @@ -341,11 +343,17 @@ jobs: ROBBOT_PASS: ${{ secrets.ROBBOT_PASS }} mac-build: - runs-on: macos-latest + strategy: + fail-fast: false + matrix: + os: [macos-14, macos-13] + runs-on: ${{ matrix.os }} env: - PLATFORM: mac + PLATFORM: mac${{ matrix.os == 'macos-14' && '-arm64' || '' }} OPAMYES: 1 MACOSX_DEPLOYMENT_TARGET: 10.13 + OCAML_VERSION: 5.1.1 + CTYPES: 0.21.1 steps: - uses: actions/checkout@main with: @@ -353,10 +361,10 @@ jobs: - name: Cache opam id: cache-opam - uses: actions/cache@v3.0.11 + uses: actions/cache@v4 with: path: ~/.opam/ - key: ${{ runner.os }}-${{ hashFiles('./haxe.opam', './libs/') }} + key: ${{ matrix.os }}-${{ hashFiles('./haxe.opam', './libs/') }} - name: Install Neko from S3 run: | @@ -366,9 +374,11 @@ jobs: tar -xf $RUNNER_TEMP/neko_latest.tar.gz -C $RUNNER_TEMP NEKOPATH=`echo $RUNNER_TEMP/neko-*-*` sudo mkdir -p /usr/local/bin + sudo mkdir -p /usr/local/include sudo mkdir -p /usr/local/lib/neko sudo ln -s $NEKOPATH/{neko,nekoc,nekoml,nekotools} /usr/local/bin/ sudo ln -s $NEKOPATH/libneko.* /usr/local/lib/ + sudo ln -s $NEKOPATH/include/* /usr/local/include/ sudo ln -s $NEKOPATH/*.ndll /usr/local/lib/neko/ echo "NEKOPATH=$NEKOPATH" >> $GITHUB_ENV @@ -383,30 +393,23 @@ jobs: PCRE2_VERSION: 10.42 run: | set -ex - brew uninstall openssl@1.0.2t || echo - brew uninstall python@2.7.17 || echo - brew untap local/openssl || echo - brew untap local/python2 || echo brew update - # brew unlink python@2 - brew bundle --file=tests/Brewfile --no-upgrade || brew link --overwrite awscli - brew install libunistring - brew install cpanminus + brew bundle --file=tests/Brewfile --no-upgrade cpanm IPC::System::Simple cpanm String::ShellQuote curl -L https://github.com/madler/zlib/releases/download/v$ZLIB_VERSION/zlib-$ZLIB_VERSION.tar.gz | tar xz cd zlib-$ZLIB_VERSION ./configure - make && make install + sudo make && sudo make install cd .. curl -L https://github.com/ARMmbed/mbedtls/archive/v$MBEDTLS_VERSION.tar.gz | tar xz cd mbedtls-$MBEDTLS_VERSION - make && make install + sudo make && sudo make install cd .. curl -L https://github.com/PCRE2Project/pcre2/releases/download/pcre2-$PCRE2_VERSION/pcre2-$PCRE2_VERSION.tar.gz | tar xz 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 - make && make install + sudo make && sudo make install cd .. - name: Install OCaml libraries @@ -415,10 +418,10 @@ jobs: set -ex opam init # --disable-sandboxing opam update - opam switch create 4.08.1 + opam switch create ${{env.OCAML_VERSION}} eval $(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 install haxe --deps-only --assume-depexts opam list