name: Linux arm64
run-name: Build And Test

on: [push]


env:
  XMAKE_ROOT: y

jobs:
  Build:
    runs-on: ubuntu-latest
    steps: 
      - name: Check out repository code
        uses: actions/checkout@v3

      - name: Prepare XMake
        uses: xmake-io/github-action-setup-xmake@v1
        with:
          xmake-version: latest
          actions-cache-folder: '.xmake-cache'
          actions-cache-key: 'ubuntu'

      - name: Install SFML
        run: |
          apt update
          apt install -y libsfml-dev
      
      - name: XMake config
        run: xmake f -p linux -y

      - name: Build
        run: xmake

      - name: Test
        run: xmake test