diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..dd070db --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,36 @@ +name: build +run-name: Build Spatial Shell +on: [push] +jobs: + build_matrix: + runs-on: ubuntu-latest + strategy: + matrix: + ocaml_compiler: [ocaml.5.0.0, ocaml.5.1.1] + steps: + - uses: actions/checkout@v4 + - name: Install system dependencies + run: sudo apt install opam scdoc + - name: Initialize Opam + run: opam init -n --bare + - name: Install dependencies + run: make build-deps OCAML_COMPILER="${{ matrix.ocaml_compiler }}" + - name: Build Spatial Shell + run: | + eval $(opam env) + make + + build_static: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install system dependencies + run: sudo apt install opam scdoc musl-dev + - name: Initialize Opam + run: opam init -n --bare + - name: Build static binaries + run: ./scripts/prepare-release-artifacts.sh + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + path: _artifacts/spatial-shell-*.tar.gz diff --git a/scripts/prepare-release-artifacts.sh b/scripts/prepare-release-artifacts.sh index 14e916c..44f24d0 100755 --- a/scripts/prepare-release-artifacts.sh +++ b/scripts/prepare-release-artifacts.sh @@ -1,4 +1,4 @@ -#!/usr/bin/sh +#!/usr/bin/bash # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this