rabbitizer/.github/workflows/check_tables.yml
2023-04-30 09:21:15 -04:00

60 lines
1.6 KiB
YAML

name: Check for ungenerated tables
# Build on every branch push, tag push, and pull request change:
on: [push, pull_request]
jobs:
check_tables:
name: Check tables
runs-on: ubuntu-latest
steps:
- name: Checkout reposistory
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: clean everything
run: make -j $(nproc) distclean
- name: make tables
run: make -j $(nproc) tables
- name: Check if there are tables changes
id: tables_changes
uses: tj-actions/verify-changed-files@v14
- name: tables changes
if: steps.tables_changes.outputs.files_changed == 'true'
run: |
echo "Changed files: ${{ steps.tables_changes.outputs.changed_files }}"
echo "Please run `make tables` and commit the result"
exit 1
check_rust_tables:
name: Check Rust tables
runs-on: ubuntu-latest
steps:
- name: Checkout reposistory
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: clean everything
run: make -j $(nproc) -C rust distclean
- name: make Rust tables
run: make -j $(nproc) -C rust tables
- name: Check if there are Rust tables changes
id: rust_tables_changes
uses: tj-actions/verify-changed-files@v14
- name: Rust tables changes
if: steps.rust_tables_changes.outputs.files_changed == 'true'
run: |
echo "Changed files: ${{ steps.rust_tables_changes.outputs.changed_files }}"
echo "Please run `make -C rust tables` and commit the result"
exit 1