removed --no-relaunch and fixed windows ci/cd #113
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: Cross-platform build | |
| on: | |
| push: | |
| branches: ["main"] | |
| paths: | |
| - 'src/**/*.cpp' | |
| - 'src/**/*.hpp' | |
| - '.github/workflows/cross-platform-build.yml' | |
| - 'CMakeLists.txt' | |
| - 'auxiliary/test_cli.sh' | |
| - 'auxiliary/test_cli.ps1' | |
| pull_request: | |
| branches: ["main"] | |
| paths: | |
| - 'src/**/*.cpp' | |
| - 'src/**/*.hpp' | |
| - '.github/workflows/cross-platform-build.yml' | |
| - 'CMakeLists.txt' | |
| - 'auxiliary/test_cli.sh' | |
| - 'auxiliary/test_cli.ps1' | |
| workflow_dispatch: | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| linux-compilation: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: true | |
| 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@v4 | |
| - 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: 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 | |
| linux-cpp-standard: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| std: [26, 23, 20, 17, 14, 11] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install g++-14 | |
| run: | | |
| sudo apt-get update -q | |
| sudo apt-get install -y --no-install-recommends g++-14 cmake | |
| - name: Configure (C++${{ matrix.std }}) | |
| run: | | |
| cmake -B build \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DCMAKE_CXX_STANDARD=${{ matrix.std }} \ | |
| -DCMAKE_CXX_COMPILER=g++-14 | |
| - name: Build (C++${{ matrix.std }}) | |
| run: cmake --build build --config Release | |
| linux-compiler-compat: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| include: | |
| - compiler: g++-12 | |
| package: g++-12 | |
| - compiler: g++-13 | |
| package: g++-13 | |
| - compiler: g++-14 | |
| package: g++-14 | |
| - compiler: clang++-16 | |
| package: clang-16 | |
| - compiler: clang++-17 | |
| package: clang-17 | |
| - compiler: clang++-18 | |
| package: clang-18 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install ${{ matrix.compiler }} | |
| run: | | |
| sudo apt-get update -q | |
| sudo apt-get install -y --no-install-recommends cmake ${{ matrix.package }} | |
| - name: Configure (${{ matrix.compiler }}) | |
| run: | | |
| cmake -B build \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} | |
| - name: Build (${{ matrix.compiler }}) | |
| run: cmake --build build --config Release | |
| macos-compilation: | |
| runs-on: macos-latest | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| include: | |
| - arch: aarch64 | |
| cmake_arch: arm64 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Configure CMake | |
| run: | | |
| cmake -B build \ | |
| -DCMAKE_BUILD_TYPE=Dev_Release \ | |
| -DCMAKE_OSX_ARCHITECTURES=${{ matrix.cmake_arch }} \ | |
| -S ${{ github.workspace }} | |
| - name: Build | |
| run: cmake --build build --config Release | |
| - name: Upload binary artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: vmaware-macos-${{ matrix.arch }} | |
| path: build/vmaware | |
| if-no-files-found: error | |
| retention-days: 30 | |
| macos-cpp-standard: | |
| runs-on: macos-latest | |
| timeout-minutes: 10 | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| std: [26, 23, 20, 17, 14, 11] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Configure (C++${{ matrix.std }}) | |
| run: cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=${{ matrix.std }} | |
| - name: Build (C++${{ matrix.std }}) | |
| run: cmake --build build --config Release | |
| windows-compilation: | |
| runs-on: windows-latest | |
| timeout-minutes: 5 | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| include: | |
| - config: 64-debug | |
| arch: x64 | |
| debug_output: ON | |
| artifact: vmaware64_debug.exe | |
| - config: 32-debug | |
| arch: Win32 | |
| debug_output: ON | |
| artifact: vmaware32_debug.exe | |
| - config: 32-release | |
| arch: Win32 | |
| debug_output: OFF | |
| artifact: vmaware32_release.exe | |
| - config: 64-release | |
| arch: x64 | |
| debug_output: OFF | |
| artifact: vmaware64_release.exe | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Disable Windows Defender real-time monitoring | |
| shell: pwsh | |
| run: Set-MpPreference -DisableRealtimeMonitoring $true | |
| - name: Configure (${{ matrix.config }}) | |
| run: cmake -B build -G "Visual Studio 17 2022" -A ${{ matrix.arch }} -DDEBUG_OUTPUT=${{ matrix.debug_output }} | |
| - name: Build (${{ matrix.config }}) | |
| run: cmake --build build --config Release | |
| - name: Rename binary with commit info | |
| shell: pwsh | |
| run: | | |
| $shortSha = "${{ github.sha }}".Substring(0,12) | |
| $run = "${{ github.run_number }}" | |
| Add-Content $env:GITHUB_ENV "SHORT_SHA=$shortSha" | |
| Rename-Item build\Release\vmaware.exe "vmaware_${run}_${shortSha}.exe" | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.artifact }} | |
| path: build\Release\vmaware_${{ github.run_number }}_${{ env.SHORT_SHA }}.exe | |
| windows-cpp-standard: | |
| runs-on: windows-latest | |
| timeout-minutes: 10 | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| std: [23, 20, 17, 14, 11] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Configure (C++${{ matrix.std }}) | |
| run: cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=${{ matrix.std }} | |
| - name: Build (C++${{ matrix.std }}) | |
| run: cmake --build build --config Release | |
| linux: | |
| needs: [linux-compilation, linux-cpp-standard, linux-compiler-compat] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - run: echo "Linux builds completed" | |
| macos: | |
| needs: [macos-compilation, macos-cpp-standard] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - run: echo "MacOS builds completed" | |
| windows: | |
| needs: [windows-compilation, windows-cpp-standard] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - run: echo "Windows builds completed" | |
| cli-test-linux: | |
| needs: [linux] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download amd64 binary | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: vmaware-linux-amd64 | |
| path: build | |
| - name: Full CLI output | |
| run: | | |
| chmod +x build/vmaware | |
| build/vmaware || true | |
| - name: Run CLI test suite | |
| run: | | |
| chmod +x build/vmaware | |
| bash auxiliary/test_cli.sh build/vmaware | |
| cli-test-macos: | |
| needs: [macos] | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download macOS binary | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: vmaware-macos-aarch64 | |
| path: build | |
| - name: Full CLI output | |
| run: | | |
| chmod +x build/vmaware | |
| build/vmaware || true | |
| - name: Run CLI test suite | |
| run: | | |
| chmod +x build/vmaware | |
| bash auxiliary/test_cli.sh build/vmaware | |
| cli-test-windows: | |
| needs: [windows] | |
| runs-on: windows-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download Windows binary | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: vmaware64_release.exe | |
| path: build | |
| - name: Full CLI output | |
| shell: pwsh | |
| run: | | |
| $bin = Get-ChildItem build -Filter "*.exe" | Select-Object -First 1 -ExpandProperty FullName | |
| & $bin; $true | |
| - name: Run CLI test suite | |
| shell: pwsh | |
| run: | | |
| $bin = Get-ChildItem build -Filter "*.exe" | Select-Object -First 1 -ExpandProperty FullName | |
| pwsh auxiliary/test_cli.ps1 -BIN $bin | |
| platform-builds: | |
| needs: [linux, macos, windows] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - run: echo "All platform builds completed" | |
| cli-tests: | |
| needs: [cli-test-linux, cli-test-macos, cli-test-windows] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - run: echo "All CLI tests completed" | |
| completed: | |
| needs: [platform-builds, cli-tests] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - run: echo "All checks passed" |