Skip to content

Introduce a variable to turn on/off Valgrind in CI workflow #48

Introduce a variable to turn on/off Valgrind in CI workflow

Introduce a variable to turn on/off Valgrind in CI workflow #48

Workflow file for this run

name: brickEmu CI
on:
workflow_dispatch:
push:
# branches: [ master ]
pull_request:
# branches: [ master ]
env:
RUN_VALGRIND: false
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, ubuntu-24.04, ubuntu-22.04, ubuntu-20.04 ]
python-version: [3.12]
steps:
- name: Checkout BrickEmu
uses: actions/checkout@v4
with:
path: src
- name: apt-get update
run: sudo apt-get --assume-yes update
- name: install build dependencies
run: sudo apt-get --assume-yes install binutils-h8300-hms gcc-h8300-hms zlib1g-dev libsdl-sound1.2-dev libasound2-dev
- name: make_brick_emu
run: |
cd src
gcc --version
make
- name: Run Valgrind Memory Checker on emu
if: ${{ RUN_VALGRIND }}

Check failure on line 38 in .github/workflows/brickEmu_CI.yml

View workflow run for this annotation

GitHub Actions / brickEmu CI

Invalid workflow file

The workflow is not valid. .github/workflows/brickEmu_CI.yml (Line: 38, Col: 13): Unrecognized named-value: 'RUN_VALGRIND'. Located at position 1 within expression: RUN_VALGRIND .github/workflows/brickEmu_CI.yml (Line: 43, Col: 13): Unrecognized named-value: 'RUN_VALGRIND'. Located at position 1 within expression: RUN_VALGRIND
uses: Ximaz/valgrind-action@1.2.1
with:
binary_path: src/emu
- name: Run Valgrind Memory Checker on brickEmu ir-server
if: ${{ RUN_VALGRIND }}
uses: Ximaz/valgrind-action@1.2.1
with:
binary_path: src/ir-server
- name: Checkout brickOS-bibo
uses: actions/checkout@v4
with:
repository: BrickBot/brickOS-bibo
path: brickos_bibo
- name: Make brickOS-bibo
run: |
cd brickos_bibo
make
- name: Run Valgrind Memory Checker on firmdl
if: ${{ RUN_VALGRIND }}
uses: Ximaz/valgrind-action@1.2.1
with:
binary_path: brickos_bibo/util/firmdl
- name: Run Valgrind Memory Checker on dll
if: ${{ RUN_VALGRIND }}
uses: Ximaz/valgrind-action@1.2.1
with:
binary_path: brickos_bibo/util/dll
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
cd src
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
cd src
python -m pytest ./tests
- name: Archive the files needed to execute
uses: actions/upload-artifact@v4
with:
name: brickEmu_[runner~${{ matrix.os }}]_run${{ github.run_id }}.${{ github.run_number }}.${{ github.run_attempt }}
path: |
src/GUI.tcl
src/emu
src/emu_server.py
src/ir-server
src/remote
src/rom.bin
src/rom.coff