From b2dcf600917132193034462a3962feeee60c565c Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Wed, 10 Apr 2024 23:24:08 +0200 Subject: [PATCH 1/3] ci: fix macOS build Work around the fact that the lua@5.1 brew formula has been disabled. Additionally, drop ragel (no necessary anymore). --- .github/workflows/build.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9e9e41101548..d9af051d91a9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,10 +29,21 @@ jobs: - name: Homebrew install dependencies # Compared to the README, adds ccache for faster compilation times # Compared to the emulator, adds p7zip. - run: > - brew install -q nasm ragel binutils coreutils libtool autoconf automake cmake makedepend - sdl2 lua@5.1 luarocks gettext pkg-config wget gnu-getopt grep bison - ccache p7zip + run: | + packages=( + nasm binutils coreutils libtool autoconf automake cmake makedepend + sdl2 lua@5.1 luarocks gettext pkg-config wget gnu-getopt grep bison + ccache p7zip + ) + # Lua 5.1 is disabled, so we need to work around that: + # - fetch all packages + brew fetch "${packages[@]}" + # - disable auto-updates + export HOMEBREW_NO_AUTO_UPDATE=1 + # - install lua@5.1 from cache + brew install "$(brew --cache lua@5.1)" + # - and install the rest + brew install "${packages[@]}" - name: Building in progress… run: | From ad449b62a0e8c149992e056a60ce8c40231ef63c Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Thu, 11 Apr 2024 00:11:10 +0200 Subject: [PATCH 2/3] ci: tweak macOS CI checkout phase Use the same parameters as for the koreader-base job (faster). --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d9af051d91a9..b15df5850dae 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,7 +24,10 @@ jobs: - name: Check out Git repository uses: actions/checkout@v4 with: + clean: false fetch-depth: 0 + filter: tree:0 + show-progress: false - name: Homebrew install dependencies # Compared to the README, adds ccache for faster compilation times From 67654687f6cf24d4376b25d0188f1f2f57bf2ea1 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Sun, 14 Apr 2024 22:29:13 +0200 Subject: [PATCH 3/3] ci: small macOS cleanups Reduce differences with the configuration used on koreader-base. --- .github/workflows/build.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b15df5850dae..670aaab9b63c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,13 +30,12 @@ jobs: show-progress: false - name: Homebrew install dependencies - # Compared to the README, adds ccache for faster compilation times - # Compared to the emulator, adds p7zip. + # Compared to the README, adds p7zip. run: | packages=( nasm binutils coreutils libtool autoconf automake cmake makedepend sdl2 lua@5.1 luarocks gettext pkg-config wget gnu-getopt grep bison - ccache p7zip + p7zip ) # Lua 5.1 is disabled, so we need to work around that: # - fetch all packages @@ -48,10 +47,18 @@ jobs: # - and install the rest brew install "${packages[@]}" + - name: Update PATH + run: | + printf '%s\n' \ + "$(brew --prefix)/opt/bison/bin" \ + "$(brew --prefix)/opt/gettext/bin" \ + "$(brew --prefix)/opt/gnu-getopt/bin" \ + "$(brew --prefix)/opt/grep/libexec/gnubin" \ + >>"${GITHUB_PATH}" + - name: Building in progress… run: | export MACOSX_DEPLOYMENT_TARGET=10.15; - export PATH="$(brew --prefix)/opt/gettext/bin:$(brew --prefix)/opt/gnu-getopt/bin:$(brew --prefix)/opt/bison/bin:$(brew --prefix)/opt/grep/libexec/gnubin:${PATH}"; ./kodev release macos - name: Uploading artifacts