Skip to content

Commit

Permalink
fix: use msys shell to install tebako gem on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
maxirmx authored Feb 28, 2025
1 parent d8b0052 commit 000cf1a
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions .github/actions/setup-tebako/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,6 @@ runs:
steps:
- name: Prepare compiler environment
shell: sh
# [TODO]
# This is really bad selector:
# if [ "${{ runner.arch }}" = "X64" ]; then
run: |
OS=$(uname -s)
if [ "$OS" = "Linux" ] && [ -e "/etc/lsb-release" ]; then
Expand Down Expand Up @@ -151,13 +148,13 @@ runs:
gem install bundler
- name: Select XCode
if: runner.os == 'macOS'
if: env.TOOLCHAIN == 'macos-arm64' || env.TOOLCHAIN == 'macos-x86_64'
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ env.XCODE_VERSION }}

- name: Install brew packages
if: runner.os == 'macOS'
if: env.TOOLCHAIN == 'macos-arm64' || env.TOOLCHAIN == 'macos-x86_64'
shell: bash
run: |
if [ ! -f Brewfile ]; then
Expand Down Expand Up @@ -203,9 +200,9 @@ runs:
shell: sh
run: gem install tebako

- name: Install tebako
- name: Install tebako on MSys
if: env.TOOLCHAIN == 'msys' && inputs.install != 'off'
shell: sh
shell: msys2 {0}
run: |
git config --global core.longpaths true
gem install tebako
Expand All @@ -221,9 +218,9 @@ runs:
shell: sh
run: echo "key=$(tebako hash)" >> $GITHUB_OUTPUT

- name: Create cache key
- name: Create cache key on MSys
if: env.TOOLCHAIN == 'msys' && inputs.cache != 'off'
id: cache-key-mingw
id: cache-key-msys
shell: msys2 {0}
run: echo "key=$(tebako hash)" >> $GITHUB_OUTPUT

Expand All @@ -232,5 +229,5 @@ runs:
uses: actions/cache@v4
with:
path: ${{ inputs.cache_path }}
key: ${{ env.TOOLCHAIN }}-${{ env.CC }}-${{ steps.cache-key.outputs.key }}-${{ steps.cache-key-mingw.outputs.key }}-v${{ inputs.cache_ver }}
key: ${{ env.TOOLCHAIN }}-${{ env.CC }}-${{ steps.cache-key.outputs.key }}-${{ steps.cache-key-msys.outputs.key }}-v${{ inputs.cache_ver }}
fail-on-cache-miss: inputs.cache == 'use'

0 comments on commit 000cf1a

Please sign in to comment.