Add Github Action support for Windows and MacOS. #27
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
paths-ignore: | |
- '**.md' | |
pull_request: | |
paths-ignore: | |
- '**.md' | |
jobs: | |
test: | |
strategy: | |
matrix: | |
emacs-version: ['29.1', '29.2', 'snapshot'] | |
os: [windows-latest] | |
# os: [ubuntu-latest, windows-latest, macos-latest] | |
runs-on: ${{matrix.os}} | |
continue-on-error: ${{matrix.emacs-version == 'snapshot'}} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Tree-Sitter Library (Linux) | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt update | |
sudo apt --assume-yes install texinfo | |
sudo apt --assume-yes install libtree-sitter-dev | |
# - name: Setup MSYS2 (Windows) | |
# if: runner.os == 'Windows' | |
# run: | | |
# echo "C:\\msys64" >> %GITHUB_PATH% | |
# echo "C:\\msys64\\usr\\bin" >> %GITHUB_PATH% | |
# echo "C:\\msys64\\mingw64\\bin" >> %GITHUB_PATH% | |
# pacman --noconfirm -S texinfo mingw-w64-x86_64-tree-sitter | |
- name: Install MSYS2 (Windows) | |
if: runner.os == 'Windows' | |
uses: msys2/setup-msys2@v2 | |
with: | |
install: >- | |
texinfo | |
mingw-w64-x86_64-tree-sitter | |
# https://github.com/msys2/setup-msys2/pull/163 | |
- name: Put MSYS2_MinGW64 on PATH | |
# there is not yet an environment variable for this path from msys2/setup-msys2 | |
run: | | |
echo "${{ runner.temp }}/msys64/usr/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
echo "${{ runner.temp }}/msys64/mingw64/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
- name: Install Tree-Sitter Library (MacOS) | |
if: runner.os == 'macOS' | |
run: brew install tree-sitter | |
- name: Setup Emacs | |
uses: jcs090218/setup-emacs@master | |
with: | |
version: ${{matrix.emacs-version}} | |
- name: Setup Eldev | |
uses: emacs-eldev/setup-eldev@v1 | |
- name: Test the project (Windows) | |
run: eldev -p -dtT test |