Contiguous Integration and tests #30
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: | |
| pull_request: | |
| jobs: | |
| build: | |
| name: Build project | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| conf_preset: [win64-visualstudio-clangcl, win64-visualstudio-msvc, ninja-multiconfig] | |
| build_type: [Debug] | |
| exclude: | |
| - os: windows-latest | |
| conf_preset: ninja-multiconfig | |
| - os: ubuntu-latest | |
| conf_preset: win64-visualstudio-clangcl | |
| - os: ubuntu-latest | |
| conf_preset: win64-visualstudio-msvc | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| shell: pwsh | |
| steps: | |
| - name: Checkout Project | |
| uses: actions/[email protected] | |
| with: | |
| submodules: recursive | |
| - name: Install CMake | |
| uses: ssrobins/install-cmake@v1 | |
| with: | |
| version: 4.1.2 | |
| - name: Install Dependencies (Linux only) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt update | |
| sudo apt install -y xorg-dev libx11-dev zstd | |
| - name: Install Dependencies (Windows only) | |
| if: runner.os == 'Windows' | |
| shell: powershell | |
| run: | | |
| choco install -y zstandard | |
| - name: Build Project | |
| run: | | |
| cmake -S . --preset ${{ matrix.conf_preset }} | |
| cmake --build --preset build-${{ matrix.conf_preset }} --target install | |
| - name: Compress Artifacts | |
| run: | | |
| $absPath = (Get-Location).Path | |
| $archiveFilename = "singularity-${{ matrix.conf_preset }}-${{ github.sha }}.tar.gz" | |
| $archivePath = Join-Path $absPath $archiveFilename | |
| Write-Host Compressing archive at $archivePath | |
| tar --use-compress-program=zstd -cf $archivePath build/${{ matrix.conf_preset }}/SingularityEngine build/${{ matrix.conf_preset }}/SingularityEngine | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Singularity Engine | |
| path: singularity-${{ matrix.conf_preset }}-${{ github.sha }}.tar.gz |