test: check exact GX impedance values in unit tests #125
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 | |
| on: | |
| push: | |
| branches: [master, main] | |
| pull_request: | |
| branches: [master, main] | |
| jobs: | |
| build: | |
| name: Build & test (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| contents: read | |
| # Hard backstop so a hung step/process never consumes the full 6-hour CI | |
| # ceiling (seen on windows-latest before the CI guard was added). | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # Exercise the platforms INSTALL.md documents: Linux, macOS, Windows. | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install CMake (Linux) | |
| if: runner.os == 'Linux' | |
| run: sudo apt-get update && sudo apt-get install -y cmake | |
| # CMake is preinstalled on the GitHub Actions macOS and Windows runners. | |
| - name: Configure | |
| run: cmake -B build -S . -DCMAKE_BUILD_TYPE=Release | |
| - name: Build | |
| run: cmake --build build --config Release -j$(nproc) 2>/dev/null || cmake --build build --config Release -j2 | |
| shell: bash | |
| - name: Run unit tests | |
| run: ctest --test-dir build --build-config Release --output-on-failure --timeout 300 | |
| shell: bash | |
| - name: Simulation smoke test | |
| shell: bash | |
| run: | | |
| BIN="build/src/nec2++" | |
| [ -f "$BIN" ] || BIN="build/src/Release/nec2++.exe" | |
| [ -f "$BIN" ] || BIN="build/src/nec2++.exe" | |
| "$BIN" -i testharness/data/herzian_dipole.nec -o smoke_output.txt | |
| grep -q "TOTAL RUN TIME" smoke_output.txt && echo "Smoke test passed" | |
| # Separate job: the WASM build (needs Docker, so Linux only). | |
| wasm: | |
| name: WASM build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Build WASM via Emscripten Docker image | |
| run: ./scripts/build_wasm_docker.sh | |
| - name: Verify WASM artifacts | |
| run: | | |
| test -f nec2pp.js | |
| test -f nec2pp.wasm | |
| echo "WASM artifacts present: $(ls -la nec2pp.js nec2pp.wasm)" |