# SPDX-FileCopyrightText: Copyright 2024 Roland Csaszar # SPDX-License-Identifier: MIT # # Project: CommonLisp-Template # File: test.yml # Date: 01.Jul.2024 # # ============================================================================== name: Test on: push: branches: ["main"] pull_request: branches: ["main"] jobs: tests: strategy: matrix: os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} steps: - name: Checkout uses: actions/checkout@v3 - name: Setup SBCL Linux if: runner.os == 'Linux' run: | eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" brew install sbcl - name: Setup SBCL Linux if: runner.os != 'Linux' run: | brew install sbcl - name: Setup Ocicl Linux if: runner.os == 'Linux' run: | eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" brew install ocicl echo '(require "asdf")' >> ~/.sbclrc ocicl setup >> ~/.sbclrc - name: Setup Ocicl if: runner.os != 'Linux' run: | brew install ocicl echo '(require "asdf")' >> ~/.sbclrc ocicl setup >> ~/.sbclrc - name: Run Tests Linux if: runner.os == 'Linux' run: | eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" sbcl --non-interactive --eval '(asdf:load-system :commonlisp-template/test)' --eval '(commonlisp-template/test:run-tests-exit)' - name: Run Tests if: runner.os != 'Linux' run: | sbcl --non-interactive --eval '(asdf:load-system :commonlisp-template/test)' --eval '(commonlisp-template/test:run-tests-exit)' tests-windows: runs-on: windows-latest steps: - name: Checkout uses: actions/checkout@v3 - name: Setup SBCL run: | choco install sbcl - name: Setup Ocicl run: | curl -L -O "https://github.com/ocicl/ocicl/archive/refs/tags/v2.3.7.zip" 7z x v2.3.7.zip cd ocicl-2.3.7 sbcl --load setup.lisp echo '(require "asdf")' >> C:\Users\runneradmin\.sbclrc C:\Users\runneradmin\AppData\Local\ocicl\bin\ocicl.exe setup >> C:\Users\runneradmin\.sbclrc - name: Run Tests run: | $env:Path += ';C:\Users\runneradmin\AppData\Local\ocicl\bin\' sbcl --non-interactive --eval '(asdf:load-system :commonlisp-template/test)' --eval '(commonlisp-template/test:run-tests-exit)'