name: CI tests

on: [push, pull_request]

jobs:
  linux:

    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - uses: leafo/gh-actions-lua@v5
    - uses: leafo/gh-actions-luarocks@v2
    - name: Build and test
      run: |
          export VERSION=`grep CMARK_VERSION_STRING ext/cmark_version.h |  awk '{gsub(/["]/,""); print $3}'`
          export REVISION=1
          sed -e "s/_VERSION/${VERSION}/g; s/_REVISION/${REVISION}/g" < rockspec.in > cmark-${VERSION}-${REVISION}.rockspec
          luarocks --local make cmark-${VERSION}-${REVISION}.rockspec

  macos:

    runs-on: macOS-latest

    steps:
    - uses: actions/checkout@v1
    - uses: leafo/gh-actions-lua@v5
    - uses: leafo/gh-actions-luarocks@v2
    - name: Build and test
      run: |
          export VERSION=`grep CMARK_VERSION_STRING ext/cmark_version.h |  awk '{gsub(/["]/,""); print $3}'`
          export REVISION=1
          sed -e "s/_VERSION/${VERSION}/g; s/_REVISION/${REVISION}/g" < rockspec.in > cmark-${VERSION}-${REVISION}.rockspec
          luarocks --local make cmark-${VERSION}-${REVISION}.rockspec


name: CI tests

on: [push, pull_request]

jobs:
  linux:

    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - uses: leafo/gh-actions-lua@v9
    - uses: leafo/gh-actions-luarocks@v4
    - name: Build and test
      run: |
          export VERSION=`grep CMARK_VERSION_STRING ext/cmark_version.h |  awk '{gsub(/["]/,""); print $3}'`
          export REVISION=1
          sed -e "s/_VERSION/${VERSION}/g; s/_REVISION/${REVISION}/g" < rockspec.in > cmark-${VERSION}-${REVISION}.rockspec
          luarocks --local make cmark-${VERSION}-${REVISION}.rockspec

  macos:

    runs-on: macOS-latest

    steps:
    - uses: actions/checkout@v1
    - uses: leafo/gh-actions-lua@v5
    - uses: leafo/gh-actions-luarocks@v2
    - name: Build and test
      run: |
          export VERSION=`grep CMARK_VERSION_STRING ext/cmark_version.h |  awk '{gsub(/["]/,""); print $3}'`
          export REVISION=1
          sed -e "s/_VERSION/${VERSION}/g; s/_REVISION/${REVISION}/g" < rockspec.in > cmark-${VERSION}-${REVISION}.rockspec
          luarocks --local make cmark-${VERSION}-${REVISION}.rockspec


Use recent versions of gh-actions-lua/luarocks.
Use recent versions of gh-actions-lua/luarocks.
