Add patches to bump ctypes #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test | |
on: | |
push: | |
branches: | |
- '*' | |
jobs: | |
monorepo-generator-test: | |
name: Monorepo Generator Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install dependencies | |
run: sudo apt-get install -y build-essential opam sudo pkg-config autoconf curl | |
- uses: actions/checkout@v3 | |
- run: git submodule init && git submodule update | |
- name: Setup opam | |
run: opam init --disable-sandboxing --auto-setup ./generate/data/repos/opam-repository && opam switch create 4.14.1 | |
- name: Add dune opam overlay | |
run: cp -rv generate/data/repos/opam-overlays /tmp/dune-universe && rm -rvf /tmp/dune-universe/.git && opam repository add dune-universe /tmp/dune-universe | |
- name: Install ocaml dependencies | |
run: opam install -y ocamlbuild dune logs fmt sexplib ppx_sexp_conv ocamlgraph opam-repository opam-monorepo | |
- name: Make test project | |
working-directory: generate | |
run: mkdir /tmp/x && bash --login -c "dune exec ./bin/dependency_closure.exe" > /tmp/x/packages && ./mkopam.sh < /tmp/x/packages > /tmp/x/x.opam | |
- name: Generate monorepo lockfile | |
working-directory: /tmp/x | |
run: opam monorepo lock | |
- name: Download monorepo packages | |
working-directory: /tmp/x | |
run: opam monorepo pull || opam monorepo pull || opam monorepo pull | |
- name: Copy temporary dune project files into monorepo | |
run: cp -rv generate/bench-proj/* generate/patches /tmp/x | |
- name: Minor package corrections | |
working-directory: /tmp/x | |
run: rm -rv duniverse/current_incr && cd duniverse/zelus && ./configure | |
- name: Make list of dune libraries | |
working-directory: /tmp/x | |
run: bash --login -c "dune exec tools/list_duniverse_libraries.exe duniverse packages tools/library-ignore-list.sexp tools/run_dune_ml.sh" > libraries.sexp | |
- name: Generate monorepo dune file | |
working-directory: /tmp/x | |
run: bash --login -c "dune exec ./tools/dune_of_sexp.exe" < libraries.sexp > dune.new && mv dune.new dune | |
- name: Apply package patches | |
working-directory: /tmp/x | |
run: for f in patches/*; do p=$(basename ${f%.diff}); if test -d duniverse/$p; then echo Applying $p; patch -p1 -d duniverse/$p < $f; fi; done | |
- name: Build monorepo | |
working-directory: /tmp/x | |
run: bash --login -c "dune exec ./hello.exe" | |
dune-monorepo-benchmark-runner-test: | |
name: Dune Benchmark Runner Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install dependencies | |
run: sudo apt-get install -y build-essential opam sudo pkg-config | |
- uses: actions/checkout@v3 | |
- name: Setup opam | |
run: opam init --disable-sandboxing --auto-setup && opam switch create 4.14.1 | |
- name: Install ocaml dependencies | |
run: opam install -y opam-monorepo dune yojson logs fmt re dune-rpc dune-rpc-lwt | |
- name: Pin dune-rpc-lwt to fix bug in latest released version | |
run: opam pin add -y dune-rpc-lwt git+https://github.com/ocaml/dune | |
- name: Build benchmark runner | |
working-directory: dune-monorepo-benchmark-runner | |
run: bash --login -c "dune build" | |
- name: Set up small monorepo | |
working-directory: small-monorepo | |
run: opam monorepo pull || opam monorepo pull || opam monorepo pull | |
- name: Run benchmark | |
working-directory: dune-monorepo-benchmark-runner | |
run: bash --login -c "_build/default/src/main.exe --dune-exe-path=\$(which dune) --monorepo-path=\$(realpath ../small-monorepo) --build-target=./small_monorepo.exe" |