2022-07-08 14:59:45 +03:00
|
|
|
name: The Juvix compiler CI
|
2023-03-21 22:01:48 +03:00
|
|
|
"on":
|
2022-07-19 19:43:16 +03:00
|
|
|
workflow_dispatch:
|
2023-01-19 17:42:56 +03:00
|
|
|
inputs:
|
2023-01-27 19:18:59 +03:00
|
|
|
ref:
|
Use restore/save github action to speed up the CI testing (#1783)
This PR addresses a caching issue in our CI by streamlining each
operating system's build and test processes, reducing CI time. 🤞 Also,
our caching strategy has been updated with the new restore/save actions.
For example, we aim to cache the .stack folder, and if the stack build
is successful, the .stack-build. The building documentation job
continues depending on the Linux build. Upon merging this PR, we get
back to the point where the CI maintain a cache for each OS to be shared
among all PRs, significantly reducing CI testing time. The expected
scenario is as follows. The CI can take, on average, 35' in Linux to
build and test everything. Using caching, that time is reduced to less
than 10'. macOS is a different story. It can easily take one hour, and
even more, the first time to build and test the project. After that, it
might take an average of 20'.
- Caching strategies
[descriptions](https://github.com/actions/cache/blob/main/caching-strategies.md#saving-cache-even-if-the-build-fails)
- Closes #1776
2023-01-31 21:34:05 +03:00
|
|
|
description: the repository ref to build
|
|
|
|
required: true
|
|
|
|
default: main
|
2022-08-04 20:12:49 +03:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
2021-12-04 15:25:15 +03:00
|
|
|
pull_request:
|
2022-04-04 16:55:15 +03:00
|
|
|
branches:
|
|
|
|
- main
|
2022-05-20 11:45:03 +03:00
|
|
|
types:
|
|
|
|
- opened
|
|
|
|
- reopened
|
|
|
|
- synchronize
|
|
|
|
- ready_for_review
|
2023-03-29 16:51:04 +03:00
|
|
|
|
2022-05-20 11:45:03 +03:00
|
|
|
concurrency:
|
2023-03-21 22:01:48 +03:00
|
|
|
group: "${{ github.workflow }}-${{ github.head_ref || github.run_id }}"
|
2022-05-20 11:45:03 +03:00
|
|
|
cancel-in-progress: true
|
2023-03-29 16:51:04 +03:00
|
|
|
|
2022-08-03 15:44:48 +03:00
|
|
|
env:
|
2023-04-12 11:07:01 +03:00
|
|
|
SKIP: ormolu,format-juvix-files,typecheck-juvix-examples
|
2022-08-03 15:44:48 +03:00
|
|
|
|
2021-12-04 15:25:15 +03:00
|
|
|
jobs:
|
2023-03-21 18:45:21 +03:00
|
|
|
pre-commit:
|
2022-04-05 20:57:21 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
Update CI to install Smoke, Github actions, and Makefile fixes (#1735)
This PR adds some maintenance at different levels to the CI config, the
Make file, and formatting.
- Most of the actions used by the CI related to haskell, ormolu, hlint
and pre-commit have been updated because Github requires NodeJS 16. This
change removes all the old warnings related to nodeJs.
In the case of ormolu, the new version makes us format some files that
were not formatted before, similarly with hlint.
- The CI has been updated to use the latest version of the Smoke testing
framework, which introduced installation of the dependencies for Linux
(libicu66) and macOS (icu4c) in the CI. In the case of macOS, the CI
uses a binary for smoke. For Linux, we use stack to build smoke from the
source. The source here is in a fork of [the official Smoke
repo](https://github.com/SamirTalwar/smoke). Such includes some
features/changes that are not yet in the official repo.
- The Makefile runs the ormolu and hlint targets using as a path for the
binaries the environment variables ORMOLU and HLINT. Thus, export those
variables in your environment before running `make check,` `make format`
or `make hlint`. Otherwise, the Makefile will use the binaries provided
by `stack`.
Co-authored-by: Paul Cadman <git@paulcadman.dev>
2023-01-24 13:50:23 +03:00
|
|
|
- uses: actions/checkout@v3
|
2023-03-21 18:45:21 +03:00
|
|
|
- uses: actions/setup-python@v4
|
2022-04-05 20:57:21 +03:00
|
|
|
with:
|
2023-03-21 22:01:48 +03:00
|
|
|
python-version: "3.11"
|
2023-03-21 18:45:21 +03:00
|
|
|
- uses: pre-commit/action@v3.0.0
|
|
|
|
|
|
|
|
ormolu:
|
2022-05-20 11:45:03 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
Use restore/save github action to speed up the CI testing (#1783)
This PR addresses a caching issue in our CI by streamlining each
operating system's build and test processes, reducing CI time. 🤞 Also,
our caching strategy has been updated with the new restore/save actions.
For example, we aim to cache the .stack folder, and if the stack build
is successful, the .stack-build. The building documentation job
continues depending on the Linux build. Upon merging this PR, we get
back to the point where the CI maintain a cache for each OS to be shared
among all PRs, significantly reducing CI testing time. The expected
scenario is as follows. The CI can take, on average, 35' in Linux to
build and test everything. Using caching, that time is reduced to less
than 10'. macOS is a different story. It can easily take one hour, and
even more, the first time to build and test the project. After that, it
might take an average of 20'.
- Caching strategies
[descriptions](https://github.com/actions/cache/blob/main/caching-strategies.md#saving-cache-even-if-the-build-fails)
- Closes #1776
2023-01-31 21:34:05 +03:00
|
|
|
- uses: actions/checkout@v3
|
2023-03-21 18:45:21 +03:00
|
|
|
- uses: mrkkrp/ormolu-action@v11
|
Use restore/save github action to speed up the CI testing (#1783)
This PR addresses a caching issue in our CI by streamlining each
operating system's build and test processes, reducing CI time. 🤞 Also,
our caching strategy has been updated with the new restore/save actions.
For example, we aim to cache the .stack folder, and if the stack build
is successful, the .stack-build. The building documentation job
continues depending on the Linux build. Upon merging this PR, we get
back to the point where the CI maintain a cache for each OS to be shared
among all PRs, significantly reducing CI testing time. The expected
scenario is as follows. The CI can take, on average, 35' in Linux to
build and test everything. Using caching, that time is reduced to less
than 10'. macOS is a different story. It can easily take one hour, and
even more, the first time to build and test the project. After that, it
might take an average of 20'.
- Caching strategies
[descriptions](https://github.com/actions/cache/blob/main/caching-strategies.md#saving-cache-even-if-the-build-fails)
- Closes #1776
2023-01-31 21:34:05 +03:00
|
|
|
with:
|
2023-03-21 18:45:21 +03:00
|
|
|
version: 0.5.2.0
|
|
|
|
extra-args: >-
|
|
|
|
--ghc-opt -XDerivingStrategies --ghc-opt -XImportQualifiedPost
|
|
|
|
--ghc-opt -XMultiParamTypeClasses --ghc-opt -XStandaloneDeriving
|
|
|
|
--ghc-opt -XTemplateHaskell --ghc-opt -XUnicodeSyntax
|
2021-12-04 16:17:49 +03:00
|
|
|
|
Use restore/save github action to speed up the CI testing (#1783)
This PR addresses a caching issue in our CI by streamlining each
operating system's build and test processes, reducing CI time. 🤞 Also,
our caching strategy has been updated with the new restore/save actions.
For example, we aim to cache the .stack folder, and if the stack build
is successful, the .stack-build. The building documentation job
continues depending on the Linux build. Upon merging this PR, we get
back to the point where the CI maintain a cache for each OS to be shared
among all PRs, significantly reducing CI testing time. The expected
scenario is as follows. The CI can take, on average, 35' in Linux to
build and test everything. Using caching, that time is reduced to less
than 10'. macOS is a different story. It can easily take one hour, and
even more, the first time to build and test the project. After that, it
might take an average of 20'.
- Caching strategies
[descriptions](https://github.com/actions/cache/blob/main/caching-strategies.md#saving-cache-even-if-the-build-fails)
- Closes #1776
2023-01-31 21:34:05 +03:00
|
|
|
build-and-test-linux:
|
|
|
|
runs-on: ubuntu-20.04
|
2022-04-04 16:55:15 +03:00
|
|
|
steps:
|
Use restore/save github action to speed up the CI testing (#1783)
This PR addresses a caching issue in our CI by streamlining each
operating system's build and test processes, reducing CI time. 🤞 Also,
our caching strategy has been updated with the new restore/save actions.
For example, we aim to cache the .stack folder, and if the stack build
is successful, the .stack-build. The building documentation job
continues depending on the Linux build. Upon merging this PR, we get
back to the point where the CI maintain a cache for each OS to be shared
among all PRs, significantly reducing CI testing time. The expected
scenario is as follows. The CI can take, on average, 35' in Linux to
build and test everything. Using caching, that time is reduced to less
than 10'. macOS is a different story. It can easily take one hour, and
even more, the first time to build and test the project. After that, it
might take an average of 20'.
- Caching strategies
[descriptions](https://github.com/actions/cache/blob/main/caching-strategies.md#saving-cache-even-if-the-build-fails)
- Closes #1776
2023-01-31 21:34:05 +03:00
|
|
|
- name: Checkout our repository
|
Update CI to install Smoke, Github actions, and Makefile fixes (#1735)
This PR adds some maintenance at different levels to the CI config, the
Make file, and formatting.
- Most of the actions used by the CI related to haskell, ormolu, hlint
and pre-commit have been updated because Github requires NodeJS 16. This
change removes all the old warnings related to nodeJs.
In the case of ormolu, the new version makes us format some files that
were not formatted before, similarly with hlint.
- The CI has been updated to use the latest version of the Smoke testing
framework, which introduced installation of the dependencies for Linux
(libicu66) and macOS (icu4c) in the CI. In the case of macOS, the CI
uses a binary for smoke. For Linux, we use stack to build smoke from the
source. The source here is in a fork of [the official Smoke
repo](https://github.com/SamirTalwar/smoke). Such includes some
features/changes that are not yet in the official repo.
- The Makefile runs the ormolu and hlint targets using as a path for the
binaries the environment variables ORMOLU and HLINT. Thus, export those
variables in your environment before running `make check,` `make format`
or `make hlint`. Otherwise, the Makefile will use the binaries provided
by `stack`.
Co-authored-by: Paul Cadman <git@paulcadman.dev>
2023-01-24 13:50:23 +03:00
|
|
|
uses: actions/checkout@v3
|
2022-04-04 16:55:15 +03:00
|
|
|
with:
|
|
|
|
path: main
|
Use restore/save github action to speed up the CI testing (#1783)
This PR addresses a caching issue in our CI by streamlining each
operating system's build and test processes, reducing CI time. 🤞 Also,
our caching strategy has been updated with the new restore/save actions.
For example, we aim to cache the .stack folder, and if the stack build
is successful, the .stack-build. The building documentation job
continues depending on the Linux build. Upon merging this PR, we get
back to the point where the CI maintain a cache for each OS to be shared
among all PRs, significantly reducing CI testing time. The expected
scenario is as follows. The CI can take, on average, 35' in Linux to
build and test everything. Using caching, that time is reduced to less
than 10'. macOS is a different story. It can easily take one hour, and
even more, the first time to build and test the project. After that, it
might take an average of 20'.
- Caching strategies
[descriptions](https://github.com/actions/cache/blob/main/caching-strategies.md#saving-cache-even-if-the-build-fails)
- Closes #1776
2023-01-31 21:34:05 +03:00
|
|
|
submodules: true
|
2022-12-08 19:51:07 +03:00
|
|
|
|
Use restore/save github action to speed up the CI testing (#1783)
This PR addresses a caching issue in our CI by streamlining each
operating system's build and test processes, reducing CI time. 🤞 Also,
our caching strategy has been updated with the new restore/save actions.
For example, we aim to cache the .stack folder, and if the stack build
is successful, the .stack-build. The building documentation job
continues depending on the Linux build. Upon merging this PR, we get
back to the point where the CI maintain a cache for each OS to be shared
among all PRs, significantly reducing CI testing time. The expected
scenario is as follows. The CI can take, on average, 35' in Linux to
build and test everything. Using caching, that time is reduced to less
than 10'. macOS is a different story. It can easily take one hour, and
even more, the first time to build and test the project. After that, it
might take an average of 20'.
- Caching strategies
[descriptions](https://github.com/actions/cache/blob/main/caching-strategies.md#saving-cache-even-if-the-build-fails)
- Closes #1776
2023-01-31 21:34:05 +03:00
|
|
|
- name: Cache LLVM and Clang
|
2022-05-16 18:17:28 +03:00
|
|
|
id: cache-llvm
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
C:/Program Files/LLVM
|
|
|
|
./llvm
|
2023-03-21 22:01:48 +03:00
|
|
|
key: "${{ runner.os }}-llvm-13"
|
2022-12-08 19:51:07 +03:00
|
|
|
|
Use restore/save github action to speed up the CI testing (#1783)
This PR addresses a caching issue in our CI by streamlining each
operating system's build and test processes, reducing CI time. 🤞 Also,
our caching strategy has been updated with the new restore/save actions.
For example, we aim to cache the .stack folder, and if the stack build
is successful, the .stack-build. The building documentation job
continues depending on the Linux build. Upon merging this PR, we get
back to the point where the CI maintain a cache for each OS to be shared
among all PRs, significantly reducing CI testing time. The expected
scenario is as follows. The CI can take, on average, 35' in Linux to
build and test everything. Using caching, that time is reduced to less
than 10'. macOS is a different story. It can easily take one hour, and
even more, the first time to build and test the project. After that, it
might take an average of 20'.
- Caching strategies
[descriptions](https://github.com/actions/cache/blob/main/caching-strategies.md#saving-cache-even-if-the-build-fails)
- Closes #1776
2023-01-31 21:34:05 +03:00
|
|
|
- name: Install LLVM and Clang
|
2022-05-16 18:17:28 +03:00
|
|
|
uses: KyleMayes/install-llvm-action@v1
|
|
|
|
with:
|
2023-03-21 22:01:48 +03:00
|
|
|
version: "13.0"
|
|
|
|
cached: "${{ steps.cache-llvm.outputs.cache-hit }}"
|
2022-12-08 19:51:07 +03:00
|
|
|
|
2022-05-16 18:17:28 +03:00
|
|
|
- name: Download and extract wasi-sysroot
|
Use restore/save github action to speed up the CI testing (#1783)
This PR addresses a caching issue in our CI by streamlining each
operating system's build and test processes, reducing CI time. 🤞 Also,
our caching strategy has been updated with the new restore/save actions.
For example, we aim to cache the .stack folder, and if the stack build
is successful, the .stack-build. The building documentation job
continues depending on the Linux build. Upon merging this PR, we get
back to the point where the CI maintain a cache for each OS to be shared
among all PRs, significantly reducing CI testing time. The expected
scenario is as follows. The CI can take, on average, 35' in Linux to
build and test everything. Using caching, that time is reduced to less
than 10'. macOS is a different story. It can easily take one hour, and
even more, the first time to build and test the project. After that, it
might take an average of 20'.
- Caching strategies
[descriptions](https://github.com/actions/cache/blob/main/caching-strategies.md#saving-cache-even-if-the-build-fails)
- Closes #1776
2023-01-31 21:34:05 +03:00
|
|
|
run: >
|
|
|
|
curl
|
|
|
|
https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-15/wasi-sysroot-15.0.tar.gz
|
|
|
|
-OL
|
2022-12-08 19:51:07 +03:00
|
|
|
|
Use restore/save github action to speed up the CI testing (#1783)
This PR addresses a caching issue in our CI by streamlining each
operating system's build and test processes, reducing CI time. 🤞 Also,
our caching strategy has been updated with the new restore/save actions.
For example, we aim to cache the .stack folder, and if the stack build
is successful, the .stack-build. The building documentation job
continues depending on the Linux build. Upon merging this PR, we get
back to the point where the CI maintain a cache for each OS to be shared
among all PRs, significantly reducing CI testing time. The expected
scenario is as follows. The CI can take, on average, 35' in Linux to
build and test everything. Using caching, that time is reduced to less
than 10'. macOS is a different story. It can easily take one hour, and
even more, the first time to build and test the project. After that, it
might take an average of 20'.
- Caching strategies
[descriptions](https://github.com/actions/cache/blob/main/caching-strategies.md#saving-cache-even-if-the-build-fails)
- Closes #1776
2023-01-31 21:34:05 +03:00
|
|
|
tar xfv wasi-sysroot-15.0.tar.gz
|
2023-03-21 18:45:21 +03:00
|
|
|
|
2022-05-16 18:17:28 +03:00
|
|
|
- name: Set WASI_SYSROOT_PATH
|
|
|
|
run: |
|
|
|
|
echo "WASI_SYSROOT_PATH=$GITHUB_WORKSPACE/wasi-sysroot" >> $GITHUB_ENV
|
2022-12-08 19:51:07 +03:00
|
|
|
|
2023-01-25 16:45:04 +03:00
|
|
|
- name: Install the latest Wasmer version
|
2023-03-21 18:45:21 +03:00
|
|
|
uses: jaxxstorm/action-install-gh-release@v1.10.0
|
2023-01-25 16:45:04 +03:00
|
|
|
with:
|
|
|
|
repo: wasmerio/wasmer
|
|
|
|
tag: latest
|
|
|
|
binaries-location: bin
|
|
|
|
cache: true
|
2022-12-08 19:51:07 +03:00
|
|
|
|
Use restore/save github action to speed up the CI testing (#1783)
This PR addresses a caching issue in our CI by streamlining each
operating system's build and test processes, reducing CI time. 🤞 Also,
our caching strategy has been updated with the new restore/save actions.
For example, we aim to cache the .stack folder, and if the stack build
is successful, the .stack-build. The building documentation job
continues depending on the Linux build. Upon merging this PR, we get
back to the point where the CI maintain a cache for each OS to be shared
among all PRs, significantly reducing CI testing time. The expected
scenario is as follows. The CI can take, on average, 35' in Linux to
build and test everything. Using caching, that time is reduced to less
than 10'. macOS is a different story. It can easily take one hour, and
even more, the first time to build and test the project. After that, it
might take an average of 20'.
- Caching strategies
[descriptions](https://github.com/actions/cache/blob/main/caching-strategies.md#saving-cache-even-if-the-build-fails)
- Closes #1776
2023-01-31 21:34:05 +03:00
|
|
|
- name: Install libicu for testing
|
|
|
|
run: sudo apt install -y libicu66
|
2022-12-08 19:51:07 +03:00
|
|
|
|
2023-03-21 18:45:21 +03:00
|
|
|
- name: Make runtime
|
2022-12-08 19:51:07 +03:00
|
|
|
run: |
|
|
|
|
cd main
|
2023-03-21 18:45:21 +03:00
|
|
|
make runtime
|
|
|
|
|
|
|
|
- name: Stack setup
|
2023-03-23 17:07:54 +03:00
|
|
|
id: stack
|
2023-03-21 18:45:21 +03:00
|
|
|
uses: freckle/stack-action@v4
|
|
|
|
with:
|
|
|
|
working-directory: main
|
|
|
|
test: false
|
2022-12-08 19:51:07 +03:00
|
|
|
|
2023-03-23 11:57:38 +03:00
|
|
|
- name: Install and test Juvix
|
2022-04-05 20:57:21 +03:00
|
|
|
id: test
|
Use restore/save github action to speed up the CI testing (#1783)
This PR addresses a caching issue in our CI by streamlining each
operating system's build and test processes, reducing CI time. 🤞 Also,
our caching strategy has been updated with the new restore/save actions.
For example, we aim to cache the .stack folder, and if the stack build
is successful, the .stack-build. The building documentation job
continues depending on the Linux build. Upon merging this PR, we get
back to the point where the CI maintain a cache for each OS to be shared
among all PRs, significantly reducing CI testing time. The expected
scenario is as follows. The CI can take, on average, 35' in Linux to
build and test everything. Using caching, that time is reduced to less
than 10'. macOS is a different story. It can easily take one hour, and
even more, the first time to build and test the project. After that, it
might take an average of 20'.
- Caching strategies
[descriptions](https://github.com/actions/cache/blob/main/caching-strategies.md#saving-cache-even-if-the-build-fails)
- Closes #1776
2023-01-31 21:34:05 +03:00
|
|
|
if: ${{ success() }}
|
2022-04-04 16:55:15 +03:00
|
|
|
run: |
|
|
|
|
cd main
|
2023-03-23 11:57:38 +03:00
|
|
|
make install
|
2022-08-03 15:44:48 +03:00
|
|
|
make test
|
2022-12-08 19:51:07 +03:00
|
|
|
|
2023-03-23 11:57:38 +03:00
|
|
|
- name: Typecheck and format Juvix examples
|
|
|
|
if: ${{ success() }}
|
2023-03-30 12:25:01 +03:00
|
|
|
continue-on-error: true
|
2023-03-23 11:57:38 +03:00
|
|
|
run: |
|
|
|
|
cd main
|
2023-04-12 11:07:01 +03:00
|
|
|
make check-format-juvix-files
|
2023-03-30 12:25:01 +03:00
|
|
|
make typecheck-juvix-examples
|
2023-03-23 11:57:38 +03:00
|
|
|
|
2022-12-12 12:26:13 +03:00
|
|
|
- name: Add ~/.local/bin to PATH
|
|
|
|
run: |
|
|
|
|
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
|
|
|
|
Update CI to install Smoke, Github actions, and Makefile fixes (#1735)
This PR adds some maintenance at different levels to the CI config, the
Make file, and formatting.
- Most of the actions used by the CI related to haskell, ormolu, hlint
and pre-commit have been updated because Github requires NodeJS 16. This
change removes all the old warnings related to nodeJs.
In the case of ormolu, the new version makes us format some files that
were not formatted before, similarly with hlint.
- The CI has been updated to use the latest version of the Smoke testing
framework, which introduced installation of the dependencies for Linux
(libicu66) and macOS (icu4c) in the CI. In the case of macOS, the CI
uses a binary for smoke. For Linux, we use stack to build smoke from the
source. The source here is in a fork of [the official Smoke
repo](https://github.com/SamirTalwar/smoke). Such includes some
features/changes that are not yet in the official repo.
- The Makefile runs the ormolu and hlint targets using as a path for the
binaries the environment variables ORMOLU and HLINT. Thus, export those
variables in your environment before running `make check,` `make format`
or `make hlint`. Otherwise, the Makefile will use the binaries provided
by `stack`.
Co-authored-by: Paul Cadman <git@paulcadman.dev>
2023-01-24 13:50:23 +03:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
repository: jonaprieto/smoke
|
|
|
|
path: smoke
|
|
|
|
|
2023-03-21 18:45:21 +03:00
|
|
|
- uses: freckle/stack-cache-action@v2
|
|
|
|
with:
|
|
|
|
working-directory: smoke
|
|
|
|
|
Update CI to install Smoke, Github actions, and Makefile fixes (#1735)
This PR adds some maintenance at different levels to the CI config, the
Make file, and formatting.
- Most of the actions used by the CI related to haskell, ormolu, hlint
and pre-commit have been updated because Github requires NodeJS 16. This
change removes all the old warnings related to nodeJs.
In the case of ormolu, the new version makes us format some files that
were not formatted before, similarly with hlint.
- The CI has been updated to use the latest version of the Smoke testing
framework, which introduced installation of the dependencies for Linux
(libicu66) and macOS (icu4c) in the CI. In the case of macOS, the CI
uses a binary for smoke. For Linux, we use stack to build smoke from the
source. The source here is in a fork of [the official Smoke
repo](https://github.com/SamirTalwar/smoke). Such includes some
features/changes that are not yet in the official repo.
- The Makefile runs the ormolu and hlint targets using as a path for the
binaries the environment variables ORMOLU and HLINT. Thus, export those
variables in your environment before running `make check,` `make format`
or `make hlint`. Otherwise, the Makefile will use the binaries provided
by `stack`.
Co-authored-by: Paul Cadman <git@paulcadman.dev>
2023-01-24 13:50:23 +03:00
|
|
|
- name: Install Smoke
|
2023-03-23 17:07:54 +03:00
|
|
|
shell: bash
|
Update CI to install Smoke, Github actions, and Makefile fixes (#1735)
This PR adds some maintenance at different levels to the CI config, the
Make file, and formatting.
- Most of the actions used by the CI related to haskell, ormolu, hlint
and pre-commit have been updated because Github requires NodeJS 16. This
change removes all the old warnings related to nodeJs.
In the case of ormolu, the new version makes us format some files that
were not formatted before, similarly with hlint.
- The CI has been updated to use the latest version of the Smoke testing
framework, which introduced installation of the dependencies for Linux
(libicu66) and macOS (icu4c) in the CI. In the case of macOS, the CI
uses a binary for smoke. For Linux, we use stack to build smoke from the
source. The source here is in a fork of [the official Smoke
repo](https://github.com/SamirTalwar/smoke). Such includes some
features/changes that are not yet in the official repo.
- The Makefile runs the ormolu and hlint targets using as a path for the
binaries the environment variables ORMOLU and HLINT. Thus, export those
variables in your environment before running `make check,` `make format`
or `make hlint`. Otherwise, the Makefile will use the binaries provided
by `stack`.
Co-authored-by: Paul Cadman <git@paulcadman.dev>
2023-01-24 13:50:23 +03:00
|
|
|
run: |
|
|
|
|
cd smoke
|
2023-03-23 17:07:54 +03:00
|
|
|
stack install --stack-root ${{ steps.stack.outputs.stack-root }}
|
Update CI to install Smoke, Github actions, and Makefile fixes (#1735)
This PR adds some maintenance at different levels to the CI config, the
Make file, and formatting.
- Most of the actions used by the CI related to haskell, ormolu, hlint
and pre-commit have been updated because Github requires NodeJS 16. This
change removes all the old warnings related to nodeJs.
In the case of ormolu, the new version makes us format some files that
were not formatted before, similarly with hlint.
- The CI has been updated to use the latest version of the Smoke testing
framework, which introduced installation of the dependencies for Linux
(libicu66) and macOS (icu4c) in the CI. In the case of macOS, the CI
uses a binary for smoke. For Linux, we use stack to build smoke from the
source. The source here is in a fork of [the official Smoke
repo](https://github.com/SamirTalwar/smoke). Such includes some
features/changes that are not yet in the official repo.
- The Makefile runs the ormolu and hlint targets using as a path for the
binaries the environment variables ORMOLU and HLINT. Thus, export those
variables in your environment before running `make check,` `make format`
or `make hlint`. Otherwise, the Makefile will use the binaries provided
by `stack`.
Co-authored-by: Paul Cadman <git@paulcadman.dev>
2023-01-24 13:50:23 +03:00
|
|
|
|
Use restore/save github action to speed up the CI testing (#1783)
This PR addresses a caching issue in our CI by streamlining each
operating system's build and test processes, reducing CI time. 🤞 Also,
our caching strategy has been updated with the new restore/save actions.
For example, we aim to cache the .stack folder, and if the stack build
is successful, the .stack-build. The building documentation job
continues depending on the Linux build. Upon merging this PR, we get
back to the point where the CI maintain a cache for each OS to be shared
among all PRs, significantly reducing CI testing time. The expected
scenario is as follows. The CI can take, on average, 35' in Linux to
build and test everything. Using caching, that time is reduced to less
than 10'. macOS is a different story. It can easily take one hour, and
even more, the first time to build and test the project. After that, it
might take an average of 20'.
- Caching strategies
[descriptions](https://github.com/actions/cache/blob/main/caching-strategies.md#saving-cache-even-if-the-build-fails)
- Closes #1776
2023-01-31 21:34:05 +03:00
|
|
|
- name: Smoke testing
|
Update CI to install Smoke, Github actions, and Makefile fixes (#1735)
This PR adds some maintenance at different levels to the CI config, the
Make file, and formatting.
- Most of the actions used by the CI related to haskell, ormolu, hlint
and pre-commit have been updated because Github requires NodeJS 16. This
change removes all the old warnings related to nodeJs.
In the case of ormolu, the new version makes us format some files that
were not formatted before, similarly with hlint.
- The CI has been updated to use the latest version of the Smoke testing
framework, which introduced installation of the dependencies for Linux
(libicu66) and macOS (icu4c) in the CI. In the case of macOS, the CI
uses a binary for smoke. For Linux, we use stack to build smoke from the
source. The source here is in a fork of [the official Smoke
repo](https://github.com/SamirTalwar/smoke). Such includes some
features/changes that are not yet in the official repo.
- The Makefile runs the ormolu and hlint targets using as a path for the
binaries the environment variables ORMOLU and HLINT. Thus, export those
variables in your environment before running `make check,` `make format`
or `make hlint`. Otherwise, the Makefile will use the binaries provided
by `stack`.
Co-authored-by: Paul Cadman <git@paulcadman.dev>
2023-01-24 13:50:23 +03:00
|
|
|
id: smoke-linux
|
Use restore/save github action to speed up the CI testing (#1783)
This PR addresses a caching issue in our CI by streamlining each
operating system's build and test processes, reducing CI time. 🤞 Also,
our caching strategy has been updated with the new restore/save actions.
For example, we aim to cache the .stack folder, and if the stack build
is successful, the .stack-build. The building documentation job
continues depending on the Linux build. Upon merging this PR, we get
back to the point where the CI maintain a cache for each OS to be shared
among all PRs, significantly reducing CI testing time. The expected
scenario is as follows. The CI can take, on average, 35' in Linux to
build and test everything. Using caching, that time is reduced to less
than 10'. macOS is a different story. It can easily take one hour, and
even more, the first time to build and test the project. After that, it
might take an average of 20'.
- Caching strategies
[descriptions](https://github.com/actions/cache/blob/main/caching-strategies.md#saving-cache-even-if-the-build-fails)
- Closes #1776
2023-01-31 21:34:05 +03:00
|
|
|
if: ${{ success() }}
|
|
|
|
run: |
|
Update CI to install Smoke, Github actions, and Makefile fixes (#1735)
This PR adds some maintenance at different levels to the CI config, the
Make file, and formatting.
- Most of the actions used by the CI related to haskell, ormolu, hlint
and pre-commit have been updated because Github requires NodeJS 16. This
change removes all the old warnings related to nodeJs.
In the case of ormolu, the new version makes us format some files that
were not formatted before, similarly with hlint.
- The CI has been updated to use the latest version of the Smoke testing
framework, which introduced installation of the dependencies for Linux
(libicu66) and macOS (icu4c) in the CI. In the case of macOS, the CI
uses a binary for smoke. For Linux, we use stack to build smoke from the
source. The source here is in a fork of [the official Smoke
repo](https://github.com/SamirTalwar/smoke). Such includes some
features/changes that are not yet in the official repo.
- The Makefile runs the ormolu and hlint targets using as a path for the
binaries the environment variables ORMOLU and HLINT. Thus, export those
variables in your environment before running `make check,` `make format`
or `make hlint`. Otherwise, the Makefile will use the binaries provided
by `stack`.
Co-authored-by: Paul Cadman <git@paulcadman.dev>
2023-01-24 13:50:23 +03:00
|
|
|
cd main
|
|
|
|
make smoke
|
|
|
|
|
Use restore/save github action to speed up the CI testing (#1783)
This PR addresses a caching issue in our CI by streamlining each
operating system's build and test processes, reducing CI time. 🤞 Also,
our caching strategy has been updated with the new restore/save actions.
For example, we aim to cache the .stack folder, and if the stack build
is successful, the .stack-build. The building documentation job
continues depending on the Linux build. Upon merging this PR, we get
back to the point where the CI maintain a cache for each OS to be shared
among all PRs, significantly reducing CI testing time. The expected
scenario is as follows. The CI can take, on average, 35' in Linux to
build and test everything. Using caching, that time is reduced to less
than 10'. macOS is a different story. It can easily take one hour, and
even more, the first time to build and test the project. After that, it
might take an average of 20'.
- Caching strategies
[descriptions](https://github.com/actions/cache/blob/main/caching-strategies.md#saving-cache-even-if-the-build-fails)
- Closes #1776
2023-01-31 21:34:05 +03:00
|
|
|
docs-linux:
|
|
|
|
needs: build-and-test-linux
|
|
|
|
runs-on: ubuntu-20.04
|
2023-03-23 17:07:54 +03:00
|
|
|
environment:
|
|
|
|
name: github-pages
|
|
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
|
|
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
|
|
|
|
permissions:
|
|
|
|
pages: write # to deploy to Pages
|
|
|
|
id-token: write # to verify the deployment originates from an appropriate source
|
|
|
|
|
2022-07-15 14:52:16 +03:00
|
|
|
steps:
|
|
|
|
- name: Checkout our repository
|
Update CI to install Smoke, Github actions, and Makefile fixes (#1735)
This PR adds some maintenance at different levels to the CI config, the
Make file, and formatting.
- Most of the actions used by the CI related to haskell, ormolu, hlint
and pre-commit have been updated because Github requires NodeJS 16. This
change removes all the old warnings related to nodeJs.
In the case of ormolu, the new version makes us format some files that
were not formatted before, similarly with hlint.
- The CI has been updated to use the latest version of the Smoke testing
framework, which introduced installation of the dependencies for Linux
(libicu66) and macOS (icu4c) in the CI. In the case of macOS, the CI
uses a binary for smoke. For Linux, we use stack to build smoke from the
source. The source here is in a fork of [the official Smoke
repo](https://github.com/SamirTalwar/smoke). Such includes some
features/changes that are not yet in the official repo.
- The Makefile runs the ormolu and hlint targets using as a path for the
binaries the environment variables ORMOLU and HLINT. Thus, export those
variables in your environment before running `make check,` `make format`
or `make hlint`. Otherwise, the Makefile will use the binaries provided
by `stack`.
Co-authored-by: Paul Cadman <git@paulcadman.dev>
2023-01-24 13:50:23 +03:00
|
|
|
uses: actions/checkout@v3
|
2022-07-15 14:52:16 +03:00
|
|
|
with:
|
|
|
|
path: main
|
|
|
|
submodules: recursive
|
|
|
|
|
2023-03-21 18:45:21 +03:00
|
|
|
- name: Install mdbook-pagetoc
|
|
|
|
uses: baptiste0928/cargo-install@v1
|
2022-08-04 17:14:29 +03:00
|
|
|
with:
|
2023-03-21 18:45:21 +03:00
|
|
|
crate: mdbook-pagetoc
|
2022-08-04 17:14:29 +03:00
|
|
|
|
2023-03-21 18:45:21 +03:00
|
|
|
- name: Install mdbook-katex
|
|
|
|
uses: baptiste0928/cargo-install@v1
|
2022-08-04 17:14:29 +03:00
|
|
|
with:
|
2023-03-21 18:45:21 +03:00
|
|
|
crate: mdbook-katex
|
2022-08-04 17:14:29 +03:00
|
|
|
|
2023-03-21 18:45:21 +03:00
|
|
|
- name: Install mdbook-linkcheck
|
|
|
|
uses: baptiste0928/cargo-install@v1
|
2022-07-15 14:52:16 +03:00
|
|
|
with:
|
2023-03-21 18:45:21 +03:00
|
|
|
crate: mdbook-linkcheck
|
2022-07-15 14:52:16 +03:00
|
|
|
|
|
|
|
- name: MDBook setup
|
|
|
|
uses: peaceiris/actions-mdbook@v1
|
|
|
|
with:
|
2023-03-21 18:45:21 +03:00
|
|
|
mdbook-version: "latest"
|
2022-08-04 11:19:03 +03:00
|
|
|
|
|
|
|
- name: Cache LLVM and Clang
|
|
|
|
id: cache-llvm
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
C:/Program Files/LLVM
|
|
|
|
./llvm
|
2023-03-21 22:01:48 +03:00
|
|
|
key: "${{ runner.os }}-llvm-13"
|
2022-08-04 11:19:03 +03:00
|
|
|
|
|
|
|
- name: Install LLVM and Clang
|
|
|
|
uses: KyleMayes/install-llvm-action@v1
|
|
|
|
with:
|
2023-03-21 22:01:48 +03:00
|
|
|
version: "13.0"
|
|
|
|
cached: "${{ steps.cache-llvm.outputs.cache-hit }}"
|
2022-08-04 11:19:03 +03:00
|
|
|
|
2023-03-21 18:45:21 +03:00
|
|
|
- name: Make runtime
|
|
|
|
run: |
|
|
|
|
cd main
|
|
|
|
make runtime
|
|
|
|
|
|
|
|
- name: Stack setup
|
2023-03-23 17:07:54 +03:00
|
|
|
id: stack
|
2023-03-21 18:45:21 +03:00
|
|
|
uses: freckle/stack-action@v4
|
|
|
|
with:
|
|
|
|
working-directory: main
|
|
|
|
test: false
|
2022-07-15 14:52:16 +03:00
|
|
|
|
2023-03-15 15:01:06 +03:00
|
|
|
- name: Generate HTML files from examples
|
Use restore/save github action to speed up the CI testing (#1783)
This PR addresses a caching issue in our CI by streamlining each
operating system's build and test processes, reducing CI time. 🤞 Also,
our caching strategy has been updated with the new restore/save actions.
For example, we aim to cache the .stack folder, and if the stack build
is successful, the .stack-build. The building documentation job
continues depending on the Linux build. Upon merging this PR, we get
back to the point where the CI maintain a cache for each OS to be shared
among all PRs, significantly reducing CI testing time. The expected
scenario is as follows. The CI can take, on average, 35' in Linux to
build and test everything. Using caching, that time is reduced to less
than 10'. macOS is a different story. It can easily take one hour, and
even more, the first time to build and test the project. After that, it
might take an average of 20'.
- Caching strategies
[descriptions](https://github.com/actions/cache/blob/main/caching-strategies.md#saving-cache-even-if-the-build-fails)
- Closes #1776
2023-01-31 21:34:05 +03:00
|
|
|
run: |
|
2022-07-15 14:52:16 +03:00
|
|
|
cd main
|
|
|
|
echo "$GITHUB_WORKSPACE/.local/bin" >> $GITHUB_PATH
|
|
|
|
make install
|
|
|
|
make html-examples
|
2023-01-23 22:33:55 +03:00
|
|
|
make demo-example
|
2022-07-15 14:52:16 +03:00
|
|
|
|
2023-04-14 12:16:05 +03:00
|
|
|
- name: Build the mdbook
|
|
|
|
run: |
|
|
|
|
cd main
|
|
|
|
make docs
|
|
|
|
|
2023-03-23 17:07:54 +03:00
|
|
|
- name: Setup Pages
|
|
|
|
uses: actions/configure-pages@v3
|
|
|
|
if: >-
|
|
|
|
github.ref == 'refs/heads/main' || github.event_name ==
|
|
|
|
'workflow_dispatch'
|
|
|
|
|
|
|
|
- name: Upload artifact
|
|
|
|
uses: actions/upload-pages-artifact@v1
|
|
|
|
if: >-
|
|
|
|
github.ref == 'refs/heads/main' || github.event_name ==
|
|
|
|
'workflow_dispatch'
|
2022-07-15 14:52:16 +03:00
|
|
|
with:
|
2023-03-23 17:07:54 +03:00
|
|
|
path: main/book/html
|
|
|
|
|
|
|
|
- name: Deploy to GitHub Pages
|
|
|
|
uses: actions/deploy-pages@v1
|
|
|
|
id: deployment
|
|
|
|
if: >-
|
|
|
|
github.ref == 'refs/heads/main' || github.event_name ==
|
|
|
|
'workflow_dispatch'
|
Use restore/save github action to speed up the CI testing (#1783)
This PR addresses a caching issue in our CI by streamlining each
operating system's build and test processes, reducing CI time. 🤞 Also,
our caching strategy has been updated with the new restore/save actions.
For example, we aim to cache the .stack folder, and if the stack build
is successful, the .stack-build. The building documentation job
continues depending on the Linux build. Upon merging this PR, we get
back to the point where the CI maintain a cache for each OS to be shared
among all PRs, significantly reducing CI testing time. The expected
scenario is as follows. The CI can take, on average, 35' in Linux to
build and test everything. Using caching, that time is reduced to less
than 10'. macOS is a different story. It can easily take one hour, and
even more, the first time to build and test the project. After that, it
might take an average of 20'.
- Caching strategies
[descriptions](https://github.com/actions/cache/blob/main/caching-strategies.md#saving-cache-even-if-the-build-fails)
- Closes #1776
2023-01-31 21:34:05 +03:00
|
|
|
|
|
|
|
build-and-test-macos:
|
|
|
|
runs-on: macos-12
|
|
|
|
steps:
|
|
|
|
- name: Checkout our repository
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
path: main
|
|
|
|
submodules: true
|
|
|
|
|
|
|
|
- name: Install ICU4C
|
|
|
|
run: |
|
|
|
|
brew install icu4c
|
|
|
|
brew link icu4c --force
|
2023-03-21 18:45:21 +03:00
|
|
|
|
Use restore/save github action to speed up the CI testing (#1783)
This PR addresses a caching issue in our CI by streamlining each
operating system's build and test processes, reducing CI time. 🤞 Also,
our caching strategy has been updated with the new restore/save actions.
For example, we aim to cache the .stack folder, and if the stack build
is successful, the .stack-build. The building documentation job
continues depending on the Linux build. Upon merging this PR, we get
back to the point where the CI maintain a cache for each OS to be shared
among all PRs, significantly reducing CI testing time. The expected
scenario is as follows. The CI can take, on average, 35' in Linux to
build and test everything. Using caching, that time is reduced to less
than 10'. macOS is a different story. It can easily take one hour, and
even more, the first time to build and test the project. After that, it
might take an average of 20'.
- Caching strategies
[descriptions](https://github.com/actions/cache/blob/main/caching-strategies.md#saving-cache-even-if-the-build-fails)
- Closes #1776
2023-01-31 21:34:05 +03:00
|
|
|
- name: Download and extract wasi-sysroot
|
|
|
|
run: >
|
|
|
|
curl
|
|
|
|
https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-15/wasi-sysroot-15.0.tar.gz
|
|
|
|
-OL
|
|
|
|
|
|
|
|
tar xfv wasi-sysroot-15.0.tar.gz
|
2023-03-21 18:45:21 +03:00
|
|
|
|
Use restore/save github action to speed up the CI testing (#1783)
This PR addresses a caching issue in our CI by streamlining each
operating system's build and test processes, reducing CI time. 🤞 Also,
our caching strategy has been updated with the new restore/save actions.
For example, we aim to cache the .stack folder, and if the stack build
is successful, the .stack-build. The building documentation job
continues depending on the Linux build. Upon merging this PR, we get
back to the point where the CI maintain a cache for each OS to be shared
among all PRs, significantly reducing CI testing time. The expected
scenario is as follows. The CI can take, on average, 35' in Linux to
build and test everything. Using caching, that time is reduced to less
than 10'. macOS is a different story. It can easily take one hour, and
even more, the first time to build and test the project. After that, it
might take an average of 20'.
- Caching strategies
[descriptions](https://github.com/actions/cache/blob/main/caching-strategies.md#saving-cache-even-if-the-build-fails)
- Closes #1776
2023-01-31 21:34:05 +03:00
|
|
|
- name: Set WASI_SYSROOT_PATH
|
|
|
|
run: |
|
|
|
|
echo "WASI_SYSROOT_PATH=$GITHUB_WORKSPACE/wasi-sysroot" >> $GITHUB_ENV
|
2023-03-21 18:45:21 +03:00
|
|
|
|
Use restore/save github action to speed up the CI testing (#1783)
This PR addresses a caching issue in our CI by streamlining each
operating system's build and test processes, reducing CI time. 🤞 Also,
our caching strategy has been updated with the new restore/save actions.
For example, we aim to cache the .stack folder, and if the stack build
is successful, the .stack-build. The building documentation job
continues depending on the Linux build. Upon merging this PR, we get
back to the point where the CI maintain a cache for each OS to be shared
among all PRs, significantly reducing CI testing time. The expected
scenario is as follows. The CI can take, on average, 35' in Linux to
build and test everything. Using caching, that time is reduced to less
than 10'. macOS is a different story. It can easily take one hour, and
even more, the first time to build and test the project. After that, it
might take an average of 20'.
- Caching strategies
[descriptions](https://github.com/actions/cache/blob/main/caching-strategies.md#saving-cache-even-if-the-build-fails)
- Closes #1776
2023-01-31 21:34:05 +03:00
|
|
|
- name: Install the latest Wasmer version
|
2023-03-21 18:45:21 +03:00
|
|
|
uses: jaxxstorm/action-install-gh-release@v1.10.0
|
Use restore/save github action to speed up the CI testing (#1783)
This PR addresses a caching issue in our CI by streamlining each
operating system's build and test processes, reducing CI time. 🤞 Also,
our caching strategy has been updated with the new restore/save actions.
For example, we aim to cache the .stack folder, and if the stack build
is successful, the .stack-build. The building documentation job
continues depending on the Linux build. Upon merging this PR, we get
back to the point where the CI maintain a cache for each OS to be shared
among all PRs, significantly reducing CI testing time. The expected
scenario is as follows. The CI can take, on average, 35' in Linux to
build and test everything. Using caching, that time is reduced to less
than 10'. macOS is a different story. It can easily take one hour, and
even more, the first time to build and test the project. After that, it
might take an average of 20'.
- Caching strategies
[descriptions](https://github.com/actions/cache/blob/main/caching-strategies.md#saving-cache-even-if-the-build-fails)
- Closes #1776
2023-01-31 21:34:05 +03:00
|
|
|
with:
|
|
|
|
repo: wasmerio/wasmer
|
|
|
|
tag: latest
|
|
|
|
binaries-location: bin
|
|
|
|
cache: true
|
|
|
|
|
|
|
|
- name: Set homebrew LLVM CC and LIBTOOL vars (macOS)
|
|
|
|
run: |
|
2023-04-06 21:16:03 +03:00
|
|
|
echo "CC=$(brew --prefix llvm@15)/bin/clang" >> $GITHUB_ENV
|
|
|
|
echo "LIBTOOL=$(brew --prefix llvm@15)/bin/llvm-ar" >> $GITHUB_ENV
|
2023-03-21 18:45:21 +03:00
|
|
|
|
|
|
|
- name: Make runtime
|
Use restore/save github action to speed up the CI testing (#1783)
This PR addresses a caching issue in our CI by streamlining each
operating system's build and test processes, reducing CI time. 🤞 Also,
our caching strategy has been updated with the new restore/save actions.
For example, we aim to cache the .stack folder, and if the stack build
is successful, the .stack-build. The building documentation job
continues depending on the Linux build. Upon merging this PR, we get
back to the point where the CI maintain a cache for each OS to be shared
among all PRs, significantly reducing CI testing time. The expected
scenario is as follows. The CI can take, on average, 35' in Linux to
build and test everything. Using caching, that time is reduced to less
than 10'. macOS is a different story. It can easily take one hour, and
even more, the first time to build and test the project. After that, it
might take an average of 20'.
- Caching strategies
[descriptions](https://github.com/actions/cache/blob/main/caching-strategies.md#saving-cache-even-if-the-build-fails)
- Closes #1776
2023-01-31 21:34:05 +03:00
|
|
|
run: |
|
|
|
|
cd main
|
2023-03-21 18:45:21 +03:00
|
|
|
make CC=$CC LIBTOOL=$LIBTOOL runtime
|
Use restore/save github action to speed up the CI testing (#1783)
This PR addresses a caching issue in our CI by streamlining each
operating system's build and test processes, reducing CI time. 🤞 Also,
our caching strategy has been updated with the new restore/save actions.
For example, we aim to cache the .stack folder, and if the stack build
is successful, the .stack-build. The building documentation job
continues depending on the Linux build. Upon merging this PR, we get
back to the point where the CI maintain a cache for each OS to be shared
among all PRs, significantly reducing CI testing time. The expected
scenario is as follows. The CI can take, on average, 35' in Linux to
build and test everything. Using caching, that time is reduced to less
than 10'. macOS is a different story. It can easily take one hour, and
even more, the first time to build and test the project. After that, it
might take an average of 20'.
- Caching strategies
[descriptions](https://github.com/actions/cache/blob/main/caching-strategies.md#saving-cache-even-if-the-build-fails)
- Closes #1776
2023-01-31 21:34:05 +03:00
|
|
|
|
2023-03-21 18:45:21 +03:00
|
|
|
- name: Stack setup
|
2023-03-23 17:07:54 +03:00
|
|
|
id: stack
|
2023-03-21 18:45:21 +03:00
|
|
|
uses: freckle/stack-action@v4
|
Use restore/save github action to speed up the CI testing (#1783)
This PR addresses a caching issue in our CI by streamlining each
operating system's build and test processes, reducing CI time. 🤞 Also,
our caching strategy has been updated with the new restore/save actions.
For example, we aim to cache the .stack folder, and if the stack build
is successful, the .stack-build. The building documentation job
continues depending on the Linux build. Upon merging this PR, we get
back to the point where the CI maintain a cache for each OS to be shared
among all PRs, significantly reducing CI testing time. The expected
scenario is as follows. The CI can take, on average, 35' in Linux to
build and test everything. Using caching, that time is reduced to less
than 10'. macOS is a different story. It can easily take one hour, and
even more, the first time to build and test the project. After that, it
might take an average of 20'.
- Caching strategies
[descriptions](https://github.com/actions/cache/blob/main/caching-strategies.md#saving-cache-even-if-the-build-fails)
- Closes #1776
2023-01-31 21:34:05 +03:00
|
|
|
with:
|
2023-03-21 18:45:21 +03:00
|
|
|
working-directory: main
|
|
|
|
test: false
|
Use restore/save github action to speed up the CI testing (#1783)
This PR addresses a caching issue in our CI by streamlining each
operating system's build and test processes, reducing CI time. 🤞 Also,
our caching strategy has been updated with the new restore/save actions.
For example, we aim to cache the .stack folder, and if the stack build
is successful, the .stack-build. The building documentation job
continues depending on the Linux build. Upon merging this PR, we get
back to the point where the CI maintain a cache for each OS to be shared
among all PRs, significantly reducing CI testing time. The expected
scenario is as follows. The CI can take, on average, 35' in Linux to
build and test everything. Using caching, that time is reduced to less
than 10'. macOS is a different story. It can easily take one hour, and
even more, the first time to build and test the project. After that, it
might take an average of 20'.
- Caching strategies
[descriptions](https://github.com/actions/cache/blob/main/caching-strategies.md#saving-cache-even-if-the-build-fails)
- Closes #1776
2023-01-31 21:34:05 +03:00
|
|
|
|
2023-03-21 21:16:24 +03:00
|
|
|
- name: Add homebrew clang to the PATH (macOS)
|
|
|
|
run: |
|
2023-04-06 21:16:03 +03:00
|
|
|
echo "$(brew --prefix llvm@15)/bin" >> $GITHUB_PATH
|
2023-03-21 21:16:24 +03:00
|
|
|
|
2023-03-23 11:57:38 +03:00
|
|
|
- name: Install and test Juvix
|
2023-03-21 18:45:21 +03:00
|
|
|
if: ${{ success() }}
|
|
|
|
run: |
|
|
|
|
cd main
|
|
|
|
make CC=$CC LIBTOOL=$LIBTOOL install
|
2023-03-23 11:57:38 +03:00
|
|
|
make CC=$CC LIBTOOL=$LIBTOOL test
|
Use restore/save github action to speed up the CI testing (#1783)
This PR addresses a caching issue in our CI by streamlining each
operating system's build and test processes, reducing CI time. 🤞 Also,
our caching strategy has been updated with the new restore/save actions.
For example, we aim to cache the .stack folder, and if the stack build
is successful, the .stack-build. The building documentation job
continues depending on the Linux build. Upon merging this PR, we get
back to the point where the CI maintain a cache for each OS to be shared
among all PRs, significantly reducing CI testing time. The expected
scenario is as follows. The CI can take, on average, 35' in Linux to
build and test everything. Using caching, that time is reduced to less
than 10'. macOS is a different story. It can easily take one hour, and
even more, the first time to build and test the project. After that, it
might take an average of 20'.
- Caching strategies
[descriptions](https://github.com/actions/cache/blob/main/caching-strategies.md#saving-cache-even-if-the-build-fails)
- Closes #1776
2023-01-31 21:34:05 +03:00
|
|
|
|
|
|
|
- name: Add ~/.local/bin to PATH
|
|
|
|
run: |
|
|
|
|
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
|
|
|
|
2023-03-23 11:57:38 +03:00
|
|
|
- name: Typecheck and format Juvix examples
|
|
|
|
if: ${{ success() }}
|
|
|
|
run: |
|
|
|
|
cd main
|
2023-04-12 11:07:01 +03:00
|
|
|
make -s check-format-juvix-files
|
2023-03-29 16:51:04 +03:00
|
|
|
make -s typecheck-juvix-examples
|
2023-03-23 11:57:38 +03:00
|
|
|
|
Use restore/save github action to speed up the CI testing (#1783)
This PR addresses a caching issue in our CI by streamlining each
operating system's build and test processes, reducing CI time. 🤞 Also,
our caching strategy has been updated with the new restore/save actions.
For example, we aim to cache the .stack folder, and if the stack build
is successful, the .stack-build. The building documentation job
continues depending on the Linux build. Upon merging this PR, we get
back to the point where the CI maintain a cache for each OS to be shared
among all PRs, significantly reducing CI testing time. The expected
scenario is as follows. The CI can take, on average, 35' in Linux to
build and test everything. Using caching, that time is reduced to less
than 10'. macOS is a different story. It can easily take one hour, and
even more, the first time to build and test the project. After that, it
might take an average of 20'.
- Caching strategies
[descriptions](https://github.com/actions/cache/blob/main/caching-strategies.md#saving-cache-even-if-the-build-fails)
- Closes #1776
2023-01-31 21:34:05 +03:00
|
|
|
- name: Install Smoke
|
2023-03-21 18:45:21 +03:00
|
|
|
uses: jaxxstorm/action-install-gh-release@v1.10.0
|
Use restore/save github action to speed up the CI testing (#1783)
This PR addresses a caching issue in our CI by streamlining each
operating system's build and test processes, reducing CI time. 🤞 Also,
our caching strategy has been updated with the new restore/save actions.
For example, we aim to cache the .stack folder, and if the stack build
is successful, the .stack-build. The building documentation job
continues depending on the Linux build. Upon merging this PR, we get
back to the point where the CI maintain a cache for each OS to be shared
among all PRs, significantly reducing CI testing time. The expected
scenario is as follows. The CI can take, on average, 35' in Linux to
build and test everything. Using caching, that time is reduced to less
than 10'. macOS is a different story. It can easily take one hour, and
even more, the first time to build and test the project. After that, it
might take an average of 20'.
- Caching strategies
[descriptions](https://github.com/actions/cache/blob/main/caching-strategies.md#saving-cache-even-if-the-build-fails)
- Closes #1776
2023-01-31 21:34:05 +03:00
|
|
|
with:
|
|
|
|
repo: jonaprieto/smoke
|
|
|
|
tag: latest
|
|
|
|
extension-matching: disable
|
|
|
|
rename-to: smoke
|
|
|
|
chmod: 0755
|
|
|
|
|
|
|
|
- name: Smoke testing (macOS)
|
|
|
|
id: smoke-macos
|
|
|
|
if: ${{ success() }}
|
|
|
|
run: |
|
|
|
|
cd main
|
|
|
|
make CC=$CC LIBTOOL=$LIBTOOL smoke
|