Skip to content

Commit

Permalink
Populate artifacts on gh actions
Browse files Browse the repository at this point in the history
  • Loading branch information
dmtrKovalenko committed Aug 25, 2024
1 parent ce3dea5 commit b484930
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,19 @@ jobs:
matrix:
include:
- os: ubuntu-latest
artifact: "linux-x64"
ocaml-compiler: "ocaml-variants.5.2.0+options,ocaml-option-flambda"
triplet: "x64-linux"
- os: windows-latest
artifact: "windows-x64"
ocaml-compiler: "ocaml-variants.5.2.0+options,ocaml-option-flambda"
triplet: "x64-mingw-static"
- os: macos-latest
artifact: "macos-arm64"
ocaml-compiler: "ocaml-variants.5.2.0+options,ocaml-option-flambda"
triplet: "arm64-osx"
- os: macos-13
artifact: "macos-x64"
ocaml-compiler: "ocaml-variants.5.2.0+options,ocaml-option-flambda"
triplet: "x64-osx"
defaults:
Expand Down Expand Up @@ -73,6 +77,13 @@ jobs:

- run: opam exec -- opam install . --deps-only --with-test
- run: opam exec -- dune build --verbose
- if: always()
uses: actions/upload-artifact@v4
with:
name: odiff-${{ matrix.artifact }}.exe
path: _build/default/bin/ODiffBin.exe
retention-days: 14

- run: opam exec -- dune exec ODiffBin -- --version
- run: opam exec -- dune runtest

Expand All @@ -94,4 +105,3 @@ jobs:

- name: e2e test
run: npm test

4 changes: 4 additions & 0 deletions bin/Main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ let getIOModule filename =
| ".jpg" | ".jpeg" -> (module ODiffIO.Jpg.IO : ImageIO)
| ".bmp" -> (module ODiffIO.Bmp.IO : ImageIO)
| ".tiff" -> (module ODiffIO.Tiff.IO : ImageIO)
| "" ->
failwith
("Usage: " ^ Sys.argv.(0)
^ " <base_image_path> <image_to_compare_path> <output_png_path>")
| f -> failwith ("This format is not supported: " ^ f)

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

0 comments on commit b484930

Please sign in to comment.