ci: bump the actions-major group with 3 updates #82
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build & Test | |
| on: | |
| push: | |
| paths: | |
| - 'src/**' | |
| - 'unittests/**' | |
| - 'CMakeLists.txt' | |
| - 'configure.ac' | |
| - 'Makefile.am' | |
| - '.github/workflows/test.yml' | |
| pull_request: | |
| branches: [master, main] | |
| paths: | |
| - 'src/**' | |
| - 'unittests/**' | |
| - 'CMakeLists.txt' | |
| - 'configure.ac' | |
| - 'Makefile.am' | |
| - '.github/workflows/test.yml' | |
| jobs: | |
| build: | |
| name: Build Project | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential libmariadb-dev libssl-dev zlib1g-dev autoconf automake libtool libgd-dev libcurl4-openssl-dev libjson-c-dev | |
| - name: Copy config headers | |
| run: | | |
| cp src/campaign.example.h src/campaign.h | |
| cp src/mud_options.example.h src/mud_options.h | |
| cp src/vnums.example.h src/vnums.h | |
| - name: Configure with autotools | |
| run: | | |
| autoreconf -fvi | |
| ./configure | |
| - name: Build | |
| run: make -j"$(nproc)" | |
| - name: Verify binary exists | |
| run: | | |
| test -f circle | |
| echo "Build successful: circle binary created" | |
| unit-tests: | |
| name: Unit Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential | |
| - name: Build unit tests | |
| working-directory: unittests/CuTest | |
| run: make all | |
| - name: Run unit tests | |
| working-directory: unittests/CuTest | |
| run: ./vessel_tests | |
| - name: Run stress tests | |
| working-directory: unittests/CuTest | |
| run: ./vessel_stress_test | |
| memory-check: | |
| name: Memory Leak Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential valgrind | |
| - name: Build unit tests | |
| working-directory: unittests/CuTest | |
| run: make all | |
| - name: Run Valgrind on unit tests | |
| working-directory: unittests/CuTest | |
| run: | | |
| valgrind --leak-check=full --track-origins=yes --error-exitcode=1 ./vessel_tests 2>&1 | tee valgrind.log | |
| # Check for memory leaks | |
| if grep -q "definitely lost: [1-9]" valgrind.log; then | |
| echo "::error::Memory leaks detected!" | |
| exit 1 | |
| fi | |
| echo "No memory leaks detected" |