ci/cd update for cmakelists trigger #23
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: Linux Multi-Architecture Build | |
| on: | |
| push: | |
| branches: ["main"] | |
| paths: | |
| - 'src/**/*.cpp' | |
| - 'src/**/*.hpp' | |
| - '.github/workflows/linux_multiarch_build.yml' | |
| - 'CMakeLists.txt' | |
| pull_request: | |
| branches: ["main"] | |
| paths: | |
| - 'src/**/*.cpp' | |
| - 'src/**/*.hpp' | |
| - '.github/workflows/linux_multiarch_build.yml' | |
| - 'CMakeLists.txt' | |
| workflow_dispatch: | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - arch: amd64 | |
| platform: linux/amd64 | |
| image: debian:bookworm | |
| - arch: arm64 | |
| platform: linux/arm64 | |
| image: debian:bookworm | |
| - arch: armhf | |
| platform: linux/arm/v7 | |
| image: debian:bookworm | |
| - arch: armel | |
| platform: linux/arm/v6 | |
| image: debian:bookworm | |
| - arch: i386 | |
| platform: linux/386 | |
| image: debian:bookworm | |
| - arch: mips64el | |
| platform: linux/mips64le | |
| image: debian:bookworm | |
| - arch: ppc64el | |
| platform: linux/ppc64le | |
| image: debian:bookworm | |
| - arch: riscv64 | |
| platform: linux/riscv64 | |
| image: debian:sid | |
| - arch: s390x | |
| platform: linux/s390x | |
| image: debian:bookworm | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Build (${{ matrix.arch }}) | |
| run: | | |
| docker run --rm \ | |
| --platform ${{ matrix.platform }} \ | |
| -v ${{ github.workspace }}:/src \ | |
| -w /src \ | |
| ${{ matrix.image }} \ | |
| bash -c " | |
| apt-get update -q && | |
| apt-get install -y --no-install-recommends cmake g++ build-essential && | |
| cmake -B build -DCMAKE_BUILD_TYPE=Release && | |
| cmake --build build --config Release | |
| " | |
| - name: Run binary (${{ matrix.arch }}) | |
| run: | | |
| docker run --rm \ | |
| --platform ${{ matrix.platform }} \ | |
| -v ${{ github.workspace }}:/src \ | |
| -w /src \ | |
| ${{ matrix.image }} \ | |
| ./build/vmaware | |
| - name: Upload binary artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: vmaware-linux-${{ matrix.arch }} | |
| path: build/vmaware | |
| if-no-files-found: error | |
| retention-days: 30 |