Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove *.opam.template #1753

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 21 additions & 62 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: build

on:
pull_request:
push:
branches:
- master
pull_request:
schedule:
# Prime the caches every Monday
- cron: 0 1 * * MON
Expand All @@ -23,62 +23,29 @@ jobs:
- "4.11"
- "4.12"
- "4.13"
- "4.14"
- "5.0"
- "5.1"
skip-test:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find the previous version much easier to understand.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR kind of inline the logic previously encoded by skip-* parameters. We know have to go over all step understand what's done for what version. I think this is going in the wrong direction.

- true
skip-doc:
- true
skip-effects:
- true
- "5.2"
include:
- os: ubuntu-latest
ocaml-compiler: "4.14"
skip-effects: true
skip-test: false
skip-doc: true
- os: ubuntu-latest
ocaml-compiler: "ocaml-variants.4.14.2+options,ocaml-option-32bit"
skip-effects: true
skip-test: false
skip-doc: true
- os: macos-latest
ocaml-compiler: "4.14"
skip-effects: true
skip-test: false
skip-doc: true
- os: windows-latest
ocaml-compiler: "4.14"
skip-effects: true
skip-test: false
skip-doc: true
- os: ubuntu-latest
ocaml-compiler: "5.2"
skip-effects: false
skip-test: false
skip-doc: false
# Note this OCaml compiler is bytecode only
- os: ubuntu-latest
ocaml-compiler: "ocaml-variants.5.2.0+options,ocaml-option-32bit"
skip-effects: true # disabled for the same reason than `skip-test`
skip-test: true # the `time_now.0.17` package is pulled and doesn't work in 32 bits :(
skip-doc: true
- os: macos-latest
ocaml-compiler: "5.2"
skip-effects: true
skip-test: false
skip-doc: true
- os: windows-latest
ocaml-compiler: "5.2"
skip-effects: false
skip-test: false
skip-doc: true
- os: ubuntu-latest
ocaml-compiler: "ocaml-variants.4.14.2+options,ocaml-option-32bit"
- os: ubuntu-latest
ocaml-compiler: "ocaml-variants.5.2.1+options,ocaml-option-32bit" # Note this OCaml compiler is bytecode only

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

steps:
- name: Set git to use LF
if: matrix.ocaml-compiler < 5.2
if: matrix.os == 'windows-latest'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this change. ocaml-compiler < 5.2 was on purpose.

run: |
git config --global core.autocrlf false
git config --global core.eol lf
Expand All @@ -88,7 +55,7 @@ jobs:
# getting much better, but no luck yet, c.f:
# https://github.com/ocaml/opam-repository/pull/26626
- name: Install apt 32-bit dependencies
if: contains( matrix.ocaml-compiler, 'ocaml-option-32bit')
if: contains(matrix.ocaml-compiler, 'ocaml-option-32bit')
run: |
sudo apt-get install aptitude
sudo dpkg --add-architecture i386
Expand All @@ -109,41 +76,33 @@ jobs:
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
dune-cache: true
opam-pin: false

- run: opam install conf-pkg-config
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need this, this is a temporary fix for dra27/mingw-w64-shims#1

if: runner.os == 'Windows'

- run: opam install . --best-effort
if: ${{ matrix.skip-test }}

- run: opam install . --with-test
if: ${{ !matrix.skip-test }}
if: matrix.ocaml-compiler < 4.14

- run: opam exec -- make all
if: ${{ !matrix.skip-test }}
- run: opam install . --deps-only --with-test --with-doc
if: matrix.ocaml-compiler >= 4.14

- run: opam exec -- make tests
if: ${{ !matrix.skip-test }}
- run: opam exec -- dune build @all @runtest
if: matrix.ocaml-compiler >= 4.14 && matrix.ocaml-compiler < 5.0

- run: opam exec -- dune build @all @runtest --profile using-effects
if: ${{ !matrix.skip-effects }}
if: matrix.ocaml-compiler >= 5.0

- run: opam exec -- git diff --exit-code
if: ${{ !matrix.skip-test }}
if: matrix.ocaml-compiler >= 4.14

- name: build doc
if: ${{ !matrix.skip-doc && github.event_name == 'push' && github.ref_name == 'master'}}
- name: Build doc
if: matrix.os == 'ubuntu-latest' && matrix.ocaml-compiler == '5.2' && github.event_name == 'push' && github.ref_name == 'master'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to only bump version once when it come to change the version we generate the doc with.

run: |
opam install odoc lwt_log cohttp-lwt-unix yojson ocp-indent graphics higlo
opam exec -- make doc

- name: synchronize doc
if: ${{ !matrix.skip-doc && github.event_name == 'push' && github.ref_name == 'master' }}
- name: Synchronize doc
if: matrix.os == 'ubuntu-latest' && matrix.ocaml-compiler == '5.2' && github.event_name == 'push' && github.ref_name == 'master'
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: wikidoc
folder: doc-dev
clean: true
target-folder: doc/dev/
target-folder: doc/dev/
3 changes: 2 additions & 1 deletion js_of_ocaml-compiler.opam
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ conflicts: [
"ocamlfind" {< "1.5.1"}
"js_of_ocaml" {< "3.0"}
]
dev-repo: "git+https://github.com/ocsigen/js_of_ocaml.git"
build: [
["dune" "subst"] {dev}
[
Expand All @@ -43,6 +42,8 @@ build: [
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
dev-repo: "git+https://github.com/ocsigen/js_of_ocaml.git"
13 changes: 0 additions & 13 deletions js_of_ocaml-compiler.opam.template

This file was deleted.

3 changes: 2 additions & 1 deletion js_of_ocaml-lwt.opam
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ depends: [
"odoc" {with-doc}
]
depopts: ["graphics" "lwt_log"]
dev-repo: "git+https://github.com/ocsigen/js_of_ocaml.git"
build: [
["dune" "subst"] {dev}
[
Expand All @@ -35,6 +34,8 @@ build: [
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
dev-repo: "git+https://github.com/ocsigen/js_of_ocaml.git"
13 changes: 0 additions & 13 deletions js_of_ocaml-lwt.opam.template

This file was deleted.

3 changes: 2 additions & 1 deletion js_of_ocaml-ppx.opam
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ depends: [
"re" {>= "1.9.0" & with-test}
"odoc" {with-doc}
]
dev-repo: "git+https://github.com/ocsigen/js_of_ocaml.git"
build: [
["dune" "subst"] {dev}
[
Expand All @@ -32,6 +31,8 @@ build: [
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
dev-repo: "git+https://github.com/ocsigen/js_of_ocaml.git"
13 changes: 0 additions & 13 deletions js_of_ocaml-ppx.opam.template

This file was deleted.

3 changes: 2 additions & 1 deletion js_of_ocaml-ppx_deriving_json.opam
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ depends: [
"re" {>= "1.9.0" & with-test}
"odoc" {with-doc}
]
dev-repo: "git+https://github.com/ocsigen/js_of_ocaml.git"
build: [
["dune" "subst"] {dev}
[
Expand All @@ -32,6 +31,8 @@ build: [
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
dev-repo: "git+https://github.com/ocsigen/js_of_ocaml.git"
13 changes: 0 additions & 13 deletions js_of_ocaml-ppx_deriving_json.opam.template

This file was deleted.

3 changes: 2 additions & 1 deletion js_of_ocaml-toplevel.opam
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ depends: [
"re" {>= "1.9.0" & with-test}
"odoc" {with-doc}
]
dev-repo: "git+https://github.com/ocsigen/js_of_ocaml.git"
build: [
["dune" "subst"] {dev}
[
Expand All @@ -35,6 +34,8 @@ build: [
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
dev-repo: "git+https://github.com/ocsigen/js_of_ocaml.git"
13 changes: 0 additions & 13 deletions js_of_ocaml-toplevel.opam.template

This file was deleted.

3 changes: 2 additions & 1 deletion js_of_ocaml-tyxml.opam
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ depends: [
"re" {>= "1.9.0" & with-test}
"odoc" {with-doc}
]
dev-repo: "git+https://github.com/ocsigen/js_of_ocaml.git"
build: [
["dune" "subst"] {dev}
[
Expand All @@ -36,6 +35,8 @@ build: [
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
dev-repo: "git+https://github.com/ocsigen/js_of_ocaml.git"
13 changes: 0 additions & 13 deletions js_of_ocaml-tyxml.opam.template

This file was deleted.

3 changes: 2 additions & 1 deletion js_of_ocaml.opam
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ depends: [
"re" {>= "1.9.0" & with-test}
"odoc" {with-doc}
]
dev-repo: "git+https://github.com/ocsigen/js_of_ocaml.git"
build: [
["dune" "subst"] {dev}
[
Expand All @@ -32,6 +31,8 @@ build: [
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
dev-repo: "git+https://github.com/ocsigen/js_of_ocaml.git"
13 changes: 0 additions & 13 deletions js_of_ocaml.opam.template

This file was deleted.

Loading