Skip to content

Commit

Permalink
Add build workflow for windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
anmaped committed Oct 17, 2024
1 parent cfaf8f6 commit 6bb3961
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 5 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/builds-and-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ jobs:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
- ubuntu-22.04
- macos-14

runs-on: ${{ matrix.os }}

Expand All @@ -27,4 +26,4 @@ jobs:
with:
ocaml-compiler: 4

- run: opam install . --deps-only --with-test
- run: opam install . --with-test
51 changes: 51 additions & 0 deletions .github/workflows/windows-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Windows build

on:
- push
- pull_request

permissions: read-all

jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout tree
uses: actions/checkout@v3

- name: Set-up OCaml
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: 4

- name: Set-up Python3
run: |
$env:Path = 'D:\cygwin\bin;' + $env:Path; setx /m PATH "$env:PATH"
opam install conf-python-3
opam exec -- python3 --version
cp D:\cygwin\bin\python3.9.exe D:\cygwin\bin\python3.exe
opam exec -- python3 --version
ls D:\cygwin ; ls D:\cygwin\bin ; $env:Path
- name: Set-up opam package z3
run: |
eval $(opam env) #
env #
cd "D:\.opam" #
cd ./repo/default/packages/z3 #
mkdir -p z3.4.11.2 #
cd z3.4.11.2 #
curl -O https://raw.githubusercontent.com/fdopen/opam-repository-mingw/refs/heads/opam2/packages/z3/z3.4.11.2/opam #
CC=$(ocamlc -config | awk -F '[\t\r ]+' '/^bytecomp_c_compiler/ {print $2}' ) #
sed -i "s~AR=~CC=$CC AR=~g" opam #
mkdir -p files #
curl -O https://raw.githubusercontent.com/fdopen/opam-repository-mingw/refs/heads/opam2/packages/z3/z3.4.11.2/files/z3-z3-4.11.2.patch #
mv z3-z3-4.11.2.patch files/ #
rm ../../../../*.cache #
shell: bash

- name: Set-up Z3
run: opam install z3=4.11.2

- name: Build rmtld3synth
run: opam install . --with-test
3 changes: 2 additions & 1 deletion rmtld3synth.opam
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ dev-repo: "git+https://github.com/anmaped/rmtld3synth.git"
doc: "https://github.com/anmaped/rmtld3synth#documentation"
synopsis: "Runtime Verification toolchain"
description: "Runtime Verification toolchain for generating monitors based on the restricted Metric Temporal Logic with Durations."
license: "LGPL-3.0-only WITH OCaml-LGPL-linking-exception"

depends: [
"ocamlfind" {build}
Expand All @@ -19,7 +20,7 @@ depends: [
"dolmen" {build}
"yojson" {build}
"ppx_yojson_conv" {build}
"z3" {="4.12.3"}
"z3" {<="4.12.3"}
"dolmen-export" {build}
]

Expand Down

0 comments on commit 6bb3961

Please sign in to comment.