1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-12 14:28:08 +03:00
Commit Graph

10 Commits

Author SHA1 Message Date
Jan Mas Rovira
3609b213f6
Use ormolu from stackage in the CI (#2900)
1. Adds the command `just format check`, which checks that all Haskell
files are formatted.
2. In CI, we use install ormolu from stackage and run it. This will
facilitate consistency between CI and local setups.

---------

Co-authored-by: Paul Cadman <git@paulcadman.dev>
2024-07-19 09:38:39 +01:00
Jan Mas Rovira
9e6e8d8a35
just format uses ghc flags in juvix.cabal (#2844) 2024-06-20 11:30:04 +02:00
Jan Mas Rovira
c825f23c58
Add pedantic option to justfile (#2816) 2024-06-08 09:44:43 +02:00
Łukasz Czajka
7e737d7037
Rust runtime (#2782)
* Closes #2781 
* This PR only implements the Rust runtime. The Rust backend / code
generation need to be implemented in a separate PR.
* The tests are unit tests for different modules and tests with
"manually" compiled Juvix programs.
* Adds building & testing of the Rust runtime to the CI.
2024-05-22 12:26:51 +02:00
Paul Cadman
47b3b199cf
justfile: replace enableOptimized flag with disableOptimized (#2783)
`just install` now builds the optimized binary by default.

use `just disableOptimized=yes install` to build the non-optimized
binary (with faster build time).
2024-05-15 12:54:50 +02:00
Paul Cadman
3c795fe011
justfile: use numParallelJobs in test flag (#2762)
The numParallelJobs option on the `justfile` is used to control the
total amount of concurrency when running build commands. This PR adds
this number to the test runner command: `+RTS -N$numParallelJobs -RTS`.
This means that `$numParallelJobs` threads will be used by the test
runner.

NB: ``+RTS -N -RTS` means that tests will use the number of threads
equal to the number of CPUs on the machine.
2024-05-03 10:05:06 +01:00
Paul Cadman
b0fb240219
Use the justfile for CI builds (#2730)
This PR changes the CI build to use the justfile instead of the Makefile
to run builds and tests. CI builds now take advantage of parallel module
builds from https://github.com/anoma/juvix/pull/2729.

In order support this the runtime build target in the justfile now
supports `runtimeCcArg` and `runtimeLibtoolArg` so that the `CC` and
`LIBTOOL` Makefile argument can be set. This is required for the macOS
build.

In addition this PR upgrades the stack setup step action. Previously the
stack build flags included `--fast` which meant the whole project was
rebuilt in the `test` step, this has also been fixed.

Overall this speeds up the CI:
* Linux now takes 30mins (from 40mins)
* macOS now takes 60mins (from 80mins)
2024-04-18 12:52:37 +02:00
Paul Cadman
622bedf222
Support parallel module compilation in justfile (#2729)
Thanks to @janmasrovira for figuring out that the stack
`--ghc-options=-j` flag enables [parallel module compilation in
GHC](https://downloads.haskell.org/ghc/latest/docs/users_guide/using.html#using-ghc-make).

This PR adds support for this in the project justfile.

You can configure the argument to `-j` using the `numParallelJobs`
option, for example:

```
just numParallelJobs=24 build
+ stack build --fast -j24 --ghc-options=-j24
```

If `numParallelJobs` is not set then `-j` is passed with no arguments in
`--ghc-options` (this is equivalent to passing the number of cpus of the
machine.) and is passed with the number of cpus of the machine for the
stack `-j` option (the stack `-j` option requires an argument).

The `numParallelJobs` option also sets the argument to the [stack `-j`
option](https://docs.haskellstack.org/en/stable/global_flags/#-jobs-or-j-option).

To disable build parallelism set the `disableParallel` flag:

```
just disableParallel=yes build
+ stack build --fast
```
2024-04-16 14:16:32 +01:00
Jan Mas Rovira
652c0e8eb2
Add -XBangPatterns to the justfile (#2627) 2024-02-08 08:31:11 +00:00
Paul Cadman
262966d745
Add a justfile to perform project install, test, clean, format tasks (#2615)
This PR adds a https://github.com/casey/just

```
$ just
Available recipes:
    build *opts  # Build the project. `build runtime` builds only the runtime.
    clean *opts  # Clean the project. `clean runtime` cleans only the runtime. `clean juvix-build` cleans only juvix-build dirs.
    format *opts # Formats all Haskell files in the project. `format changed` formats only changed files. `format FILES` formats individual files.
    install      # Install juvix
    test *filter # Run the tests in the project. Use the filter arg to set a Tasty pattern.
```

---------

Co-authored-by: Jan Mas Rovira <janmasrovira@gmail.com>
2024-02-02 12:48:14 +01:00