Skip to content

Commit

Permalink
fix(ci): Windows odoc build (#94)
Browse files Browse the repository at this point in the history
* fix(ci): Windows odoc build

* Disable windows build on github actions

* Remove odoc dependency

* Manually install odoc for docs building on CI
  • Loading branch information
dmtrKovalenko authored Apr 27, 2024
1 parent 3aea0c0 commit a6f8e3c
Show file tree
Hide file tree
Showing 29 changed files with 333 additions and 908 deletions.
3 changes: 2 additions & 1 deletion .ci/esy-build-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ steps:
- template: utils/restore-build-cache.yml
- script: "esy build --release"
displayName: "esy build --release"
- template: utils/create-docs.yml
# odoc on windows in azure fails for unknown reason. Disable until figure out.
# - template: utils/create-docs.yml
- script: "esy test"
displayName: "Run tests"
- task: PublishBuildArtifacts@1
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macos-latest, windows-latest]
os: [ubuntu-20.04, macos-latest]
steps:
- uses: actions/setup-node@v2
with:
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:

# Here we use a low-level command. In real situation you don't have to
# but it is useful in CI as it split the log in GitHub UI.
# You can see at a glance if it is your projet or your deps that break.
# You can see at a glance if it is your project or your deps that break.
#
# We also use --release flag to build less.
# This allow us to spot syntax/type error more quickly.
Expand All @@ -65,7 +65,7 @@ jobs:
- name: Build project
run: esy build

- name: Ensure reamde is up-to-date
- name: Ensure readme is up-to-date
run: node scripts/process-readme.js verify

# Here we cleanup if we have a cache fail because we use restore-keys.
Expand All @@ -89,6 +89,3 @@ jobs:
with:
name: orange_diff_generated
path: test/test-images

- name: Build docs
run: esy doc
6 changes: 4 additions & 2 deletions bin/Main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ let getIOModule filename =

type 'output diffResult = { exitCode : int; diff : 'output option }

(* Arguments must remain positional for the cmd parser lib that we use *)
let main img1Path img2Path diffPath threshold outputDiffMask failOnLayoutChange
diffColorHex stdoutParsableString antialiasing ignoreRegions diffLines =
diffColorHex toEmitStdoutParsableString antialiasing ignoreRegions diffLines
=
let module IO1 = (val getIOModule img1Path) in
let module IO2 = (val getIOModule img2Path) in
let module Diff = MakeDiff (IO1) (IO2) in
Expand All @@ -26,7 +28,7 @@ let main img1Path img2Path diffPath threshold outputDiffMask failOnLayoutChange
| Some col -> col
| None -> (255, 0, 0))
()
|> Print.printDiffResult stdoutParsableString
|> Print.printDiffResult toEmitStdoutParsableString
|> function
| Layout -> { diff = None; exitCode = 21 }
| Pixel (diffOutput, diffCount, stdoutParsableString, _) when diffCount = 0
Expand Down
Loading

0 comments on commit a6f8e3c

Please sign in to comment.