diff --git a/.github/actions/internal/prepare-os/action.yml b/.github/actions/internal/prepare-os/action.yml index 6e3f0c6..d4596d9 100644 --- a/.github/actions/internal/prepare-os/action.yml +++ b/.github/actions/internal/prepare-os/action.yml @@ -35,7 +35,7 @@ runs: # workaround to prevent "Error: The `brew link` step did not complete successfully" during "brew install mono" # and setup-python action, see https://github.com/actions/setup-python/issues/577 - rm -f \ + sudo rm -f \ /usr/local/share/man/man1/* \ /usr/local/share/man/man5/* \ /usr/local/bin/idle3* \ diff --git a/.github/actions/internal/setup-lua/action.yml b/.github/actions/internal/setup-lua/action.yml index f49b695..ea90ea5 100644 --- a/.github/actions/internal/setup-lua/action.yml +++ b/.github/actions/internal/setup-lua/action.yml @@ -158,7 +158,12 @@ runs: echo "::group::Setup Lua: Install hererocks dependencies" case "${{ runner.os }}" in Linux) sudo apt-get install -y --no-install-recommends build-essential libpcre2-dev libssl-dev libreadline-dev cmake unzip ;; - macOS) brew install pcre openssl@1.1; lualib_install_opts+=" OPENSSL_DIR=/usr/local/opt/openssl@1.1" ;; + macOS) + brew install pcre pcre2 openssl@1.1 + lualib_install_opts+=" OPENSSL_DIR=$(brew --prefix openssl@1.1)" + lualib_install_opts+=" PCRE_DIR=$(brew --prefix pcre)" + lualib_install_opts+=" PCRE2_DIR=$(brew --prefix pcre2)" + ;; esac echo "::endgroup::" diff --git a/.github/actions/internal/setup-neko/action.yml b/.github/actions/internal/setup-neko/action.yml index fa0da6e..6c9fe86 100644 --- a/.github/actions/internal/setup-neko/action.yml +++ b/.github/actions/internal/setup-neko/action.yml @@ -54,10 +54,15 @@ runs: macOS) if [[ ! -f "$NEKO_HOME/neko" ]]; then rm -rf "$NEKO_HOME" + case "$(machine)" in + *arm*) archive_suffix=osx-arm64 ;; + *) archive_suffix=osx64 ;; + esac + if [[ $NEKO_VERSION == 'latest' ]]; then - archive_url=$(eval curl -sSfL ${auth_header:-} https://api.github.com/repos/HaxeFoundation/neko/releases | grep -o "https://.*/download/.*/neko.*-osx64.tar.gz" | head -n 1) + archive_url=$(eval curl -sSfL ${auth_header:-} https://api.github.com/repos/HaxeFoundation/neko/releases | grep -o "https://.*/download/.*/neko.*-${archive_suffix}.tar.gz" | head -n 1) else - archive_url="https://github.com/HaxeFoundation/neko/releases/download/v${NEKO_VERSION//./-}/neko-${NEKO_VERSION}-osx64.tar.gz" + archive_url="https://github.com/HaxeFoundation/neko/releases/download/v${NEKO_VERSION//./-}/neko-${NEKO_VERSION}-${archive_suffix}.tar.gz" fi mkdir -p "$NEKO_HOME" $(set -x; curl -sSfL $archive_url | tar -xz --strip-components=1 -C "$NEKO_HOME") diff --git a/.github/actions/setup-haxe/action.yml b/.github/actions/setup-haxe/action.yml index d388415..eda3227 100644 --- a/.github/actions/setup-haxe/action.yml +++ b/.github/actions/setup-haxe/action.yml @@ -112,8 +112,11 @@ runs: echo "$HAXE_HOME" >> "$GITHUB_PATH" echo "HAXEPATH=$HAXE_HOME" | tee -a "$GITHUB_ENV" echo "HAXE_STD_PATH=$HAXE_HOME/std" | tee -a "$GITHUB_ENV" - - ln -sfv "$(dirname $(which neko))/libneko.2.dylib" "$HAXE_HOME/libneko.2.dylib" # workaround for "dyld: Library not loaded: @rpath/libneko.2.dylib" + + # workaround for "dyld: Library not loaded: @rpath/libneko.2.dylib" + (set -x; ln -sfv "$(dirname $(which neko))/libneko.2.dylib" "$HAXE_HOME/libneko.2.dylib") + (set -x; sudo mkdir -p /usr/local/lib; sudo ln -sfv "$(dirname $(which neko))/libneko.2.dylib" /usr/local/lib/libneko.2.dylib) + (set -x; haxelib setup $HAXE_HOME/lib) ;; Windows) @@ -138,7 +141,7 @@ runs: echo "$(cygpath -w "$HAXE_HOME")" >> "$GITHUB_PATH" echo "HAXEPATH=$(cygpath -w "$HAXE_HOME")" | tee -a "$GITHUB_ENV" echo "HAXE_STD_PATH=$(cygpath -w "$HAXE_HOME/std")" | tee -a "$GITHUB_ENV" - + (set -x; haxelib setup "$(cygpath "$HAXE_HOME")\\lib") ;; esac @@ -149,7 +152,6 @@ runs: shell: bash run: haxe -version # haxe 3 only supports -version. haxe 4 also --version - - name: "Install: yq" # https://github.com/mikefarah/yq uses: vegardit/gha-setup-yq@v1 diff --git a/.github/workflows/build.action-setup-haxe-targets.yml b/.github/workflows/build.action-setup-haxe-targets.yml index 380cc6e..a4b7acb 100644 --- a/.github/workflows/build.action-setup-haxe-targets.yml +++ b/.github/workflows/build.action-setup-haxe-targets.yml @@ -41,9 +41,10 @@ jobs: strategy: fail-fast: false matrix: - os: + os: # https://github.com/actions/runner-images#available-images - ubuntu-latest - - macos-latest + - macos-13 # Intel + - macos-latest # ARM - windows-latest steps: diff --git a/.github/workflows/build.action-test-with-haxe.yml b/.github/workflows/build.action-test-with-haxe.yml index 04fd89a..605d98a 100644 --- a/.github/workflows/build.action-test-with-haxe.yml +++ b/.github/workflows/build.action-test-with-haxe.yml @@ -42,15 +42,20 @@ jobs: strategy: fail-fast: false matrix: - os: + os: # https://github.com/actions/runner-images#available-images - ubuntu-latest - - macos-latest + - macos-13 # Intel - windows-latest haxe: - nightly - - 4.3.4 + - 4.3.5 - 4.2.5 - 3.4.7 + include: + - os: macos-latest # ARM + haxe: nightly + - os: macos-latest # ARM + haxe: 4.3.5 steps: - name: Show environment variables diff --git a/.github/workflows/build.workflow-test-with-haxe.yml b/.github/workflows/build.workflow-test-with-haxe.yml index f87518f..7657f86 100644 --- a/.github/workflows/build.workflow-test-with-haxe.yml +++ b/.github/workflows/build.workflow-test-with-haxe.yml @@ -41,15 +41,20 @@ jobs: strategy: fail-fast: false matrix: - os: + os: # https://github.com/actions/runner-images#available-images - ubuntu-latest - - macos-latest + - macos-13 # Intel - windows-latest haxe: - nightly - - 4.3.4 + - 4.3.5 - 4.2.5 - 3.4.7 + include: + - os: macos-latest # ARM + haxe: nightly + - os: macos-latest # ARM + haxe: 4.3.5 with: haxe-reusable-workflows-repo: ${{ github.repository }} haxe-reusable-workflows-version: ${{ github.ref }}