From 1fbeb967471f29b88a9a5ea126a846cdbf8aaf12 Mon Sep 17 00:00:00 2001 From: Troy Brown Date: Sun, 24 Mar 2024 22:35:31 -0400 Subject: [PATCH] Add Github Action support for Windows and MacOS. --- .github/workflows/test.yml | 41 ++++++++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f9c1a1b..214fd11 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,21 +12,48 @@ jobs: test: strategy: matrix: - emacs-version: ['29.1', '29.2', 'snapshot'] - runs-on: ubuntu-latest + # emacs-version: ['29.1', '29.2'] + emacs-version: ['29.1'] + os: [windows-latest] + # os: [ubuntu-latest, windows-latest, macos-latest] + # include: + # - os: ubuntu-latest + # emacs-version: 'snapshot' + runs-on: ${{matrix.os}} continue-on-error: ${{matrix.emacs-version == 'snapshot'}} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - - name: Install Tree-Sitter Library + - name: Install Tree-Sitter Library (Linux) + if: runner.os == 'Linux' run: | sudo apt update sudo apt --assume-yes install libtree-sitter-dev + - name: Install Tree-Sitter Library (Windows) + if: runner.os == 'Windows' + uses: msys2/setup-msys2@v2 + with: + install: texinfo mingw-w64-x86_64-tree-sitter + # install: mingw-w64-x86_64-tree-sitter + + - name: Fix MSYS2 makeinfo Installation (Windows) + if: runner.os == 'Windows' + shell: cmd + # NOTE: https://github.com/msys2/setup-msys2/pull/163 + run: | + echo @echo off>> ${{runner.temp}}\msys64\mingw64\bin\makeinfo.bat + echo perl ${{runner.temp}}\msys64\usr\bin\makeinfo %%*>> ${{runner.temp}}\msys64\mingw64\bin\makeinfo.bat + echo ${{runner.temp}}\msys64\mingw64\bin>> %GITHUB_PATH% + + - name: Install Tree-Sitter Library (MacOS) + if: runner.os == 'macOS' + run: brew install tree-sitter + - name: Setup Emacs - uses: purcell/setup-emacs@master + uses: jcs090218/setup-emacs@master with: version: ${{matrix.emacs-version}} @@ -34,6 +61,4 @@ jobs: uses: emacs-eldev/setup-eldev@v1 - name: Test the project - run: | - sudo apt --assume-yes install texinfo - eldev -p -dtT test + run: eldev -p -dtT test