Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check with GitHub Actions #51

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
57 changes: 57 additions & 0 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main

name: example

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} ${{ matrix.config.msystem }}

defaults:
run:
shell: ${{ matrix.config.shell }}

strategy:
fail-fast: false
matrix:
config:
- {os: macOS-latest, shell: bash, allow_fail: true }
- {os: windows-latest, shell: 'msys2 {0}', msystem: MINGW64, allow_fail: true }
- {os: windows-latest, shell: 'msys2 {0}', msystem: MINGW32, allow_fail: true }
- {os: ubuntu-22.04, shell: bash, allow_fail: false }
- {os: ubuntu-20.04, shell: bash, allow_fail: false }
- {os: ubuntu-18.04, shell: bash, allow_fail: false }

steps:
- uses: actions/checkout@v2

- uses: msys2/setup-msys2@v2
if: runner.os == 'Windows'
with:
msystem: ${{ matrix.config.msystem }}
install: 'gcc make'

- name: Configure
run: |
mkdir build
cd build
../configure && rm config.log

- name: Make
run: |
cd build
make

- name: Check
run: |
cd build
make check || ( head -n 1000 *.log && ${{ matrix.config.allow_fail }} )