build: make 32/64-bit truncation & overflow bug classes build failures #60
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" ] | |
| pull_request: | |
| branches: [ "master" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install dependencies | |
| run: sudo apt-get update && sudo apt-get install -y zlib1g-dev gcc-i686-linux-gnu | |
| - name: Build | |
| run: make | |
| - name: Run unit + integration tests | |
| run: make check | |
| # Build the 32-bit x86 binary too (auto-static when cross-compiling), so the | |
| # end-to-end step also covers the x86_32 fixture. If the static link is | |
| # unavailable the i686 fixture just skips below — never fatal. | |
| - name: Build i686 | |
| run: make build CC=i686-linux-gnu-gcc || true | |
| # End-to-end over the REAL binary on the x86 fixtures, run NATIVELY (no | |
| # qemu): the only CI coverage of main() + the engine bridge + the renderers, | |
| # which `make check` compiles out under -DKASLD_TESTING. Foreign-arch | |
| # fixtures need qemu and are skipped here (the cross job build-checks them). | |
| - name: End-to-end replay (x86, native) | |
| run: KASLD_NATIVE=1 tests/replay tests/fixtures/x86_64/* tests/fixtures/x86_32/* | |
| cross-compile: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install cross-compilers | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| gcc-aarch64-linux-gnu \ | |
| gcc-arm-linux-gnueabi \ | |
| gcc-arm-linux-gnueabihf \ | |
| gcc-i686-linux-gnu \ | |
| gcc-mips-linux-gnu \ | |
| gcc-mipsel-linux-gnu \ | |
| gcc-mips64-linux-gnuabi64 \ | |
| gcc-mips64el-linux-gnuabi64 \ | |
| gcc-powerpc-linux-gnu \ | |
| gcc-powerpc64-linux-gnu \ | |
| gcc-powerpc64le-linux-gnu \ | |
| gcc-riscv64-linux-gnu \ | |
| gcc-s390x-linux-gnu | |
| # TODO: loongarch64 — no gcc-loongarch64-linux-gnu package in Ubuntu. | |
| # TODO: armeb — no big-endian ARM package in Ubuntu. | |
| - name: Cross-compile all targets | |
| run: make cross |