From 11b53840a9396a5d6253bbb32c6b7f9c9036755f Mon Sep 17 00:00:00 2001 From: Hugo Parente Lima Date: Tue, 19 Sep 2023 21:05:24 -0300 Subject: [PATCH] Add CI back to the project. --- .github/workflows/ci.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..0956e01 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,38 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + schedule: + - cron: '0 0 * * *' + +jobs: + tests: + strategy: + fail-fast: true + matrix: + # Remove -Dno_terminal when libvte-2.91-gtk4-dev gets available on latest github actions ubuntu + flags: ["-Dno_terminal"] + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v3 + - name: Install Crystal + uses: crystal-lang/install-crystal@v1 + with: + crystal: latest + - name: Install dependencies + run: sudo apt-get update -y && sudo apt-get install libgtk-4-dev libgtksourceview-5-dev libadwaita-1-dev gobject-introspection gir1.2-gtk-4.0 libgirepository1.0-dev + - name: Install crystal dependencies + run: shards install + - name: Linter + run: crystal tool format --check + - name: Generate bindings + run: ./bin/gi-crystal + - name: Compile + run: shards build ${{ matrix.flags }} -s + - name: Run tests + uses: GabrielBB/xvfb-action@v1 + with: + run: crystal spec ${{ matrix.flags }} -v