name: build

on: [push]

jobs:
  build:
    strategy:
      matrix:
        os: [ubuntu-latest, macOS-latest]

    runs-on: ${{ matrix.os }}
    
    steps:
    - uses: actions/checkout@v1
    - name: Install dependencies (Ubuntu)
      if: startsWith(matrix.os, 'Ubuntu')
      run: |
        sudo apt-get update
        sudo apt-get install bison flex spim
    - name: Install dependencies (macOS)
      if: startsWith(matrix.os, 'macOS')
      run: |
        brew update
        brew install bison flex spim
    - name: Debug build and test
      run: |
        mkdir build && cd build
        cmake -DCMAKE_BUILD_TYPE=Debug ..
        cmake --build . --config Debug
        ../tests/test.sh ./scc
        
    - name: Release build and test
      run: |
        rm -rf build && mkdir build && cd build
        cmake -DCMAKE_BUILD_TYPE=Release ..
        cmake --build . --config Release
        ../tests/test.sh ./scc

name: build

on: [push]

jobs:
  build:
    strategy:
      matrix:
        os: [ubuntu-latest, macOS-latest]

    runs-on: ${{ matrix.os }}
    
    steps:
    - uses: actions/checkout@v1
    - name: Install dependencies (Ubuntu)
      if: startsWith(matrix.os, 'Ubuntu')
      run: |
        sudo apt-get update
        sudo apt-get install bison flex spim
    - name: Install dependencies (macOS)
      if: startsWith(matrix.os, 'macOS')
      run: |
        brew update
        brew install bison flex spim
    - name: Debug build and test
      run: |
        mkdir build && cd build
        cmake -DCMAKE_BUILD_TYPE=Debug ..
        cmake --build . --config Debug
        chmod +x ../tests/test.sh
        ../tests/test.sh ./scc
        
    - name: Release build and test
      run: |
        rm -rf build && mkdir build && cd build
        cmake -DCMAKE_BUILD_TYPE=Release ..
        cmake --build . --config Release
        chmod +x ../tests/test.sh
        ../tests/test.sh ./scc

Add permission to script file.
Add permission to script file.