[CI] Rework CI build.yml, to get debug mode build-and-test coverage #2
Workflow file for this run
This file contains 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 and Test | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
build_type: [release, debug] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
#! python-app.yml actually runs Py-tests. But test.sh also invokes | |
#! them (by default; some duplication). So install reqd s/w up front. | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pytest | |
#! - name: configure | |
#! run: ./configure | |
#! Ensure that standalone target still works on its own | |
- name: genloc | |
run: BUILD_MODE=${{ matrix.build_type }} make genloc | |
- name: clean | |
run: BUILD_MODE=${{ matrix.build_type }} make clean | |
- name: make-all-verbose | |
run: BUILD_MODE=${{ matrix.build_type }} CC=gcc LD=g++ BUILD_VERBOSE=1 make | |
#! Execute testing targets; Run py-test and LOC-enabled sample programs | |
- name: make-tests | |
run: | | |
make clean | |
BUILD_MODE=${{ matrix.build_type }} CC=gcc LD=g++ make run-tests | |
#! Execute testing targets; Run py-test and LOC-enabled sample programs | |
- name: test-make-with-external-cflags | |
run: | | |
make clean | |
BUILD_MODE=${{ matrix.build_type }} CC=gcc LD=g++ CFLAGS='-DLOC_FILE_INDEX=LOC_$(subst .,_,$(subst -,_,$(notdir $<)))' make -f Makefile.ext-CFLAGS run-tests | |
#! Same as above, but just feed the CFLAGS emitted by Py-generator. | |
- name: test-make-with-cflags-emitted-by-python-generator | |
run: | | |
make clean | |
BUILD_MODE=${{ matrix.build_type }} CC=gcc LD=g++ CFLAGS=$(./loc/gen_loc_files.py --src-root-dir ./test-code/single-file-cc-program --gen-cflags-brief) make -f Makefile.ext-CFLAGS run-tests | |
#! - name: Run check | |
#! run: make check | |
#! - name: Run distcheck | |
#! run: make distcheck |