-
Notifications
You must be signed in to change notification settings - Fork 429
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into sanderspies/fix_2682
- Loading branch information
Showing
233 changed files
with
32,042 additions
and
527 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
name: esy CI | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
- macos-latest | ||
- windows-latest | ||
|
||
ocaml-compiler: | ||
# Please keep the list in sync with the minimal version of OCaml in | ||
# esy.json, reason.esy/reason.opam and rtop.esy/rtop.opam. | ||
- 4.06.x # We support 4.06 because is the one that is used in BuckleScript / ReScript v9 | ||
- 4.10.x | ||
- 4.12.x | ||
- 4.14.x | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
|
||
- name: Install esy | ||
run: npm install -g [email protected] | ||
|
||
- name: Restore global cache (~/.esy/source) | ||
id: global-cache | ||
uses: actions/cache/restore@v3 | ||
with: | ||
path: ~/.esy/source | ||
key: esy-source-${{ matrix.os }}-${{ matrix.ocaml-compiler }}-${{ hashFiles('esy.lock.json') }} | ||
|
||
- name: Print esy cache | ||
id: print_esy_cache | ||
run: echo "ESY_CACHE=$(node .github/workflows/print-esy-cache.js)" >> $GITHUB_OUTPUT; | ||
|
||
- name: Load dependencies cache | ||
id: deps-cache | ||
uses: actions/cache/restore@v3 | ||
with: | ||
path: | | ||
${{ steps.print_esy_cache.outputs.ESY_CACHE }} | ||
_export | ||
key: esy-build-${{ matrix.os }}-${{ matrix.ocaml-compiler }}-${{ hashFiles('esy.lock.json') }} | ||
restore-keys: esy-build-${{ matrix.os }}- | ||
|
||
- name: Instal OCaml ${{ matrix.ocaml-compiler }} | ||
run: esy add ocaml@${{ matrix.ocaml-compiler }} | ||
|
||
- name: Install dependencies | ||
run: esy install | ||
|
||
- name: Import dependencies | ||
if: steps.deps-cache.outputs.cache-hit == 'true' | ||
# Don't crash the run if esy cache import fails - mostly happens on Windows | ||
continue-on-error: true | ||
run: | | ||
esy import-dependencies _export | ||
rm -rf _export | ||
- name: Build dependencies | ||
run: esy build-dependencies | ||
|
||
- name: Build | ||
run: esy build | ||
|
||
- name: Test when not Windows | ||
if: runner.os != 'Windows' | ||
run: esy dune runtest | ||
|
||
- name: Test when Windows | ||
if: runner.os == 'Windows' | ||
run: esy b dune runtest -p "reason,rtop" | ||
|
||
- name: Export dependencies | ||
if: steps.deps-cache.outputs.cache-hit != 'true' | ||
run: esy export-dependencies | ||
|
||
- name: Save global cache | ||
uses: actions/cache/save@v3 | ||
if: steps.global-cache.outputs.cache-hit != 'true' | ||
with: | ||
path: ~/.esy/source | ||
key: esy-source-${{ matrix.os }}-${{ matrix.ocaml-compiler }}-${{ hashFiles('esy.lock.json') }} | ||
|
||
- name: Save dependencies cache | ||
if: steps.deps-cache.outputs.cache-hit != 'true' | ||
uses: actions/cache/save@v3 | ||
with: | ||
path: | | ||
${{ steps.print_esy_cache.outputs.ESY_CACHE }} | ||
_export | ||
key: esy-build-${{ matrix.os }}-${{ matrix.ocaml-compiler }}-${{ hashFiles('esy.lock.json') }} | ||
|
||
# Cleanup build cache in case dependencies have changed | ||
- name: Cleanup | ||
if: steps.deps-cache.outputs.cache-hit != 'true' | ||
run: esy cleanup . |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
name: opam CI | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
- macos-latest | ||
- windows-latest | ||
|
||
ocaml-compiler: | ||
# Please keep the list in sync with the minimal version of OCaml in | ||
# esy.json, reason.esy/reason.opam and rtop.esy/rtop.opam. | ||
- 4.06.x # We support 4.06 because is the one that is used in BuckleScript / ReScript v9 | ||
- 4.10.x | ||
- 4.12.x | ||
- 4.14.x | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Use OCaml ${{ matrix.ocaml-compiler }} | ||
uses: ocaml/setup-ocaml@v2 | ||
with: | ||
ocaml-compiler: ${{ matrix.ocaml-compiler }} | ||
opam-pin: false | ||
|
||
- name: Load opam cache when not Windows | ||
if: runner.os != 'Windows' | ||
id: opam-cache | ||
uses: actions/cache/restore@v3 | ||
with: | ||
path: ~/.opam | ||
key: opam-${{ matrix.os }}-${{ matrix.ocaml-compiler }}-${{ hashFiles('**.opam') }} | ||
|
||
- name: Load opam cache when Windows | ||
if: runner.os == 'Windows' | ||
id: opam-cache-windows | ||
uses: actions/cache/restore@v3 | ||
with: | ||
path: _opam | ||
key: opam-${{ matrix.os }}-${{ matrix.ocaml-compiler }}-${{ hashFiles('**.opam') }} | ||
|
||
- name: Install dependencies | ||
run: opam install . --deps-only | ||
|
||
- name: Build reason and rtop | ||
run: opam exec -- dune build -p reason,rtop | ||
|
||
- name: Test | ||
run: opam exec -- dune runtest | ||
|
||
- name: Save cache when not Windows | ||
uses: actions/cache/save@v3 | ||
if: steps.opam-cache.outputs.cache-hit != 'true' && runner.os != 'Windows' | ||
with: | ||
path: ~/.opam | ||
key: opam-${{ matrix.os }}-${{ matrix.ocaml-compiler }}-${{ hashFiles('**.opam') }} | ||
|
||
- name: Save cache when Windows | ||
uses: actions/cache/save@v3 | ||
if: steps.opam-cache-windows.outputs.cache-hit != 'true' && runner.os == 'Windows' | ||
with: | ||
path: _opam | ||
key: opam-${{ matrix.os }}-${{ matrix.ocaml-compiler }}-${{ hashFiles('**.opam') }} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const fs = require("fs"); | ||
const os = require("os"); | ||
const path = require("path"); | ||
|
||
const ESY_FOLDER = process.env.ESY__PREFIX | ||
? process.env.ESY__PREFIX | ||
: path.join(os.homedir(), ".esy"); | ||
|
||
const someEsy3 = fs | ||
.readdirSync(ESY_FOLDER) | ||
.filter((name) => name.length > 0 && name[0] === "3"); | ||
|
||
const esy3 = someEsy3 | ||
.sort() | ||
.pop(); | ||
|
||
console.log(path.join(ESY_FOLDER, esy3, "i")); |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
(lang dune 2.7) | ||
(lang dune 2.8) | ||
(name reason) | ||
|
||
(using menhir 2.0) | ||
|
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
Oops, something went wrong.