bcomp 0.1.0

A compiler for a subset of the BASIC language
name: Build Test and deploy
run-name: ${{ github.actor }} is building and testing the emulator!
on: [push]
env:
  CARGO_TERM_COLOR: always # I like the colors
jobs:
  lint:
    runs-on: ubuntu-latest
    container:
      image: rust:latest
    steps:
      - name: Checkout Code
        uses: actions/checkout@v4
        # Linter uses git history
        with:
          fetch-depth: 0
      - name: Cache Rust build
        uses: Swatinem/rust-cache@v2
      - name: Install Rust components
        run: rustup component add clippy rustfmt
      - name: Pass linter
        run: |
          cargo clippy -- -Dwarnings
      - name: Check formatting
        run: |
          cargo fmt --check
        
  build:
    needs: [lint]
    runs-on: ubuntu-latest
    container:
      image: rust:latest
    steps:
      - name: Checkout Code
        uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - name: Cache Rust build
        uses: Swatinem/rust-cache@v2
      - name: Install Rust components
        run: rustup component add clippy rustfmt
      - name: Build source
        run: cargo build --all-targets
      - name: Test source
        run: cargo test


# Notes: 
# - Maybe we should add a linter for every file
# - I should containerize this with all our dependencies and publish
# - Idk theres more stuff I should change in the workflow but I forgot