chore: Add CI workflow for building and testing #1
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: Build and Test | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install Clang | |
run: sudo apt-get install -y clang | |
- name: Install Xmake | |
run: | | |
curl -fsSL https://xmake.io/shget.text | bash | |
echo 'export PATH=$HOME/.xmake/repositories/xmake/repo/packages/x/xmake/xmake/core/xdemo/cli/cli/xmake:$PATH' >> $GITHUB_ENV | |
- name: Configure xmake | |
run: ~/.xmake/repositories/xmake/repo/packages/x/xmake/xmake/core/xdemo/cli/cli/xmake f -c --toolchain=ZennityLang_Toolchain | |
- name: Build project | |
run: ~/.xmake/repositories/xmake/repo/packages/x/xmake/xmake/core/xdemo/cli/cli/xmake | |
- name: Run tests | |
run: ./build/prompt |