-
Notifications
You must be signed in to change notification settings - Fork 428
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into sanderspies/fix_2681
- Loading branch information
Showing
416 changed files
with
22,408 additions
and
101,521 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,63 @@ | ||
name: Nix Pipeline | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
ubuntu-tests: | ||
name: Build and test (Ubuntu) (${{ matrix.ocaml-version }}) | ||
|
||
strategy: | ||
matrix: | ||
ocaml-version: | ||
- 4_14 | ||
- 5_0 | ||
- 5_1 | ||
- 5_2 | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: 'recursive' | ||
- uses: cachix/install-nix-action@v27 | ||
with: | ||
extra_nix_config: | | ||
extra-substituters = https://anmonteiro.nix-cache.workers.dev | ||
extra-trusted-public-keys = ocaml.nix-cache.com-1:/xI2h2+56rwFfKyyFVbkJSeGqSIYMC/Je+7XXqGKDIY= | ||
- name: "Run nix-build" | ||
run: nix-build ./nix/ci.nix --argstr ocamlVersion ${{ matrix.ocaml-version }} | ||
|
||
macos-tests: | ||
name: Build and test (${{ matrix.os }}) (${{ matrix.ocaml-version }}) | ||
|
||
strategy: | ||
matrix: | ||
os: | ||
- macos-13 | ||
- macos-14 | ||
ocaml-version: | ||
- 4_14 | ||
- 5_0 | ||
- 5_2 | ||
|
||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: 'recursive' | ||
- uses: cachix/install-nix-action@v27 | ||
with: | ||
extra_nix_config: | | ||
extra-substituters = https://anmonteiro.nix-cache.workers.dev | ||
extra-trusted-public-keys = ocaml.nix-cache.com-1:/xI2h2+56rwFfKyyFVbkJSeGqSIYMC/Je+7XXqGKDIY= | ||
- name: "Run nix-build" | ||
run: nix-build ./nix/ci.nix --argstr ocamlVersion ${{ matrix.ocaml-version }} | ||
|
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 |
---|---|---|
|
@@ -13,11 +13,13 @@ install: | |
# CI uses opam. Regular workflow needn't. | ||
test-ci: install test-once-installed | ||
|
||
# Can be run with esy x - no need to build beforehand. | ||
test-once-installed: clean-tests | ||
./miscTests/rtopIntegrationTest.sh | ||
./miscTests/backportSyntaxTests.sh | ||
cd formatTest; ./test.sh | ||
test-once-installed: test | ||
|
||
test: | ||
esy dune runtest | ||
|
||
test-watch: | ||
esy dune runtest --watch | ||
|
||
.PHONY: coverage | ||
coverage: | ||
|
@@ -26,53 +28,33 @@ coverage: | |
bisect-ppx-report -ignore-missing-files -I _build/ -html coverage-after/ bisect*.out ./*/*/*/bisect*.out | ||
find -iname "bisect*.out" -exec rm {} \; | ||
|
||
clean-tests: | ||
rm -rf ./formatTest/**/actual_output | ||
rm -rf ./formatTest/**/intf_output | ||
rm -rf ./formatTest/**/**/TestTest.cmi | ||
rm -f ./formatTest/failed_tests | ||
rm -f ./miscTests/reactjs_jsx_ppx_tests/*.cm* | ||
|
||
testFormat: build clean-tests | ||
cd formatTest; ./test.sh | ||
testFormat: build test-once-installed | ||
|
||
all_errors: | ||
@ echo "Regenerate all the possible error states for Menhir." | ||
@ echo "Warning: This will take a while and use a lot of CPU and memory." | ||
@ echo "---" | ||
menhir --explain --strict --unused-tokens src/reason-parser/reason_parser.mly --list-errors > src/reason-parser/reason_parser.messages.checked-in | ||
|
||
clean: clean-tests | ||
clean: | ||
dune clean | ||
|
||
clean-for-ci: clean-tests | ||
clean-for-ci: | ||
rm -rf ./_build | ||
|
||
.PHONY: build clean | ||
|
||
# For publishing esy releases to npm | ||
esy-prepublish: build clean-tests | ||
esy-prepublish: build | ||
node ./scripts/esy-prepublish.js | ||
|
||
# For OPAM | ||
release_check: | ||
./scripts/release-check.sh | ||
|
||
# For OPAM | ||
release: release_check | ||
git add package.json src/refmt/package.ml reason.opam | ||
git commit -m "Version $(version)" | ||
git tag -a $(version) -m "Version $(version)." | ||
# Push first the objects, then the tag. | ||
git push "[email protected]:reasonml/reason.git" | ||
git push "[email protected]:reasonml/reason.git" tag $(version) | ||
git clean -fdx | ||
./scripts/opam-release.sh | ||
|
||
.PHONY: release | ||
|
||
all-supported-ocaml-versions: | ||
# the --dev flag has been omitted here but should be re-introduced eventually | ||
dune build @install @runtest --root . | ||
|
||
.PHONY: all-supported-ocaml-versions | ||
|
||
doc: | ||
esy dune build @doc | ||
|
||
.PHONY: doc |
Oops, something went wrong.