Skip to content

Merge pull request #5 from SingularityEngineDev/ci #37

Merge pull request #5 from SingularityEngineDev/ci

Merge pull request #5 from SingularityEngineDev/ci #37

Workflow file for this run

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.zstd"
$archivePath = Join-Path $absPath $archiveFilename
$buildPath = Join-Path $absPath build/${{ matrix.conf_preset}}/SingularityEngine
Write-Host Compressing $buildPath at $archivePath
tar -cf - -C $buildPath . | zstd -19 -T0 -o $archivePath
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: singularity-engine-${{ matrix.conf_preset }}-${{ github.sha }}
path: singularity-${{ matrix.conf_preset }}-${{ github.sha }}.tar.zstd