name: Linux

on:
  pull_request:
  push:

jobs:
  build:
    strategy:
      matrix:
        os: [ubuntu-latest]

    runs-on: ${{ matrix.os }}

    steps:
      - uses: actions/checkout@v1
      - uses: xmake-io/github-action-setup-xmake@v1
        with:
          xmake-version: branch@dev
          build-cache: true

      - name: Tests
        run: |
          xmake
          xmake run demo
          xmake f -m debug
          xmake -r
          xmake run demo
          xmake f --micro=y
          xmake -r
          xmake run demo
          xmake f --small=y -m debug
          xmake -r
          xmake run demo
