Skip to content

Commit

Permalink
Merge pull request #15 from Yag000/ci-on-pr
Browse files Browse the repository at this point in the history
Run the ci on PRs from foreign repos
  • Loading branch information
hferee authored Jun 28, 2024
2 parents dbfe6f2 + f9aeb2b commit 2b872f2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@ name: Build doc

on:
push:
pull_request:

jobs:
build:
name: Build docs
runs-on: ubuntu-latest

# Avoid running twice the action if it's triggered by a push on a PR from a branch on the repo.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name

container:
image: coqorg/coq:8.19
# This is a workaround a "bug" on the checkout action,
Expand Down
17 changes: 5 additions & 12 deletions bin/benchmark.ml
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
open UIML.UIML_extraction
open UIML.Formulas
open Modal_expressions_parser

let rec weight = function
| Bot -> 1
| Var _ -> 1
| And (f1, f2) -> 2 + weight f1 + weight f2
| Or (f1, f2) -> 3 + weight f1 + weight f2
| Implies (f1, f2) -> 1 + weight f1 + weight f2
| Box f -> 1 + weight f
open Printer

type 'a timed_result = { value : 'a; time : float }

Expand Down Expand Up @@ -41,13 +34,13 @@ let bench_one fs =
[
{
name = "A " ^ fs;
before = time (fun f -> weight (isl_A [ 'p' ] f)) f;
after = time (fun f -> weight (isl_simplified_A [ 'p' ] f)) f;
before = time (fun f -> int_of_nat (weight (isl_A [ 'p' ] f))) f;
after = time (fun f -> int_of_nat (weight (isl_simplified_A [ 'p' ] f))) f;
};
{
name = "E " ^ fs;
before = time (fun f -> weight (isl_E [ 'p' ] f)) f;
after = time (fun f -> weight (isl_simplified_E [ 'p' ] f)) f;
before = time (fun f -> int_of_nat (weight (isl_E [ 'p' ] f))) f;
after = time (fun f -> int_of_nat (weight (isl_simplified_E [ 'p' ] f))) f;
};
]

Expand Down
2 changes: 1 addition & 1 deletion bin/uiml_cmdline.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open ExEnum
open Exenum
open Printer
open UIML.Formulas
open Sys
Expand Down

0 comments on commit 2b872f2

Please sign in to comment.