name: NASM CI/CD

on:
  push:
    branches: [ "*" ]
  pull_request:
    branches: [ "*" ]

jobs:
  build:
    name: Build and test
    runs-on: ubuntu-latest

    container:
      image: ubuntu:24.04

    steps:
      - name: Install dependencies
        run: |
          apt-get update && apt-get install -y automake perl python3 build-essential

      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Prepare build system
        run: |
          sh autogen.sh
          sh configure

      - name: Build
        run: |
          make
          ./nasm --version

      - name: Run travis tests
        run: |
          make travis
