2023-04-21 20:05:24 +03:00
|
|
|
name: 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
|
2023-06-16 16:29:31 +03:00
|
|
|
VAMPIRREPO: anoma/vamp-ir
|
|
|
|
VAMPIRVERSION: v0.1.3
|
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-08-25 19:37:23 +03:00
|
|
|
version: 0.5.3.0
|
2023-03-21 18:45:21 +03:00
|
|
|
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:
|
2023-05-22 20:49:36 +03:00
|
|
|
runs-on: ubuntu-22.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-05-22 20:49:36 +03:00
|
|
|
- name: Add ~/.local/bin to PATH
|
|
|
|
run: |
|
|
|
|
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
|
|
|
|
2023-08-28 10:32:26 +03:00
|
|
|
- name: Install the latest Wasmer version
|
|
|
|
uses: jaxxstorm/action-install-gh-release@v1.10.0
|
|
|
|
with:
|
|
|
|
repo: wasmerio/wasmer
|
|
|
|
binaries-location: bin
|
|
|
|
chmod: 0755
|
2023-05-22 20:49:36 +03:00
|
|
|
|
|
|
|
- name: Install libs
|
|
|
|
run: sudo apt install -y libncurses5
|
|
|
|
|
|
|
|
- name: Install VampIR for testing
|
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:
|
2023-06-16 16:29:31 +03:00
|
|
|
repo: ${{ env.VAMPIRREPO }}
|
2023-05-22 20:49:36 +03:00
|
|
|
platform: linux
|
2023-06-16 16:29:31 +03:00
|
|
|
tag: ${{ env.VAMPIRVERSION }}
|
2023-05-22 20:49:36 +03:00
|
|
|
chmod: 0755
|
|
|
|
rename-to: vamp-ir
|
2022-12-08 19:51:07 +03:00
|
|
|
|
2023-05-22 20:49:36 +03:00
|
|
|
- name: Test VampIR
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
vamp-ir --version
|
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-05-19 18:33:56 +03:00
|
|
|
shell: bash
|
2023-03-23 11:57:38 +03:00
|
|
|
run: |
|
|
|
|
cd main
|
2023-05-19 18:33:56 +03:00
|
|
|
make check-format-juvix-files && make typecheck-juvix-examples
|
2023-03-23 11:57:38 +03:00
|
|
|
|
2023-05-22 20:49:36 +03:00
|
|
|
- name: Install Smoke for testing
|
|
|
|
uses: jaxxstorm/action-install-gh-release@v1.10.0
|
2023-03-21 18:45:21 +03:00
|
|
|
with:
|
2023-05-22 20:49:36 +03:00
|
|
|
repo: jonaprieto/smoke
|
|
|
|
platform: linux
|
|
|
|
tag: v2.3.2
|
|
|
|
chmod: 0755
|
|
|
|
rename-to: smoke
|
|
|
|
extension-matching: disable
|
|
|
|
cache: enable
|
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
|
|
|
|
2023-09-01 14:37:06 +03:00
|
|
|
# Smoke tests make git commits
|
|
|
|
- name: Setup git
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
git config --global user.email "tara-juvix@heliax.dev"
|
|
|
|
git config --global user.name "Tara"
|
|
|
|
git config --global init.defaultBranch 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
|
|
|
- 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
|
2023-05-22 20:49:36 +03:00
|
|
|
make smoke-only
|
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
|
|
|
build-and-test-macos:
|
|
|
|
runs-on: macos-12
|
|
|
|
steps:
|
|
|
|
- name: Checkout our repository
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
path: main
|
|
|
|
submodules: true
|
|
|
|
|
2023-05-24 15:32:08 +03:00
|
|
|
- name: Install Sed
|
|
|
|
run: |
|
|
|
|
brew install gnu-sed
|
|
|
|
echo "$(brew --prefix)/opt/gnu-sed/libexec/gnubin" >> $GITHUB_PATH
|
|
|
|
|
|
|
|
- name: Test Sed
|
|
|
|
run: |
|
|
|
|
sed --version
|
|
|
|
|
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
|
|
|
|
2023-08-28 10:32:26 +03:00
|
|
|
- name: Install the latest Wasmer version
|
|
|
|
uses: jaxxstorm/action-install-gh-release@v1.10.0
|
|
|
|
with:
|
|
|
|
repo: wasmerio/wasmer
|
|
|
|
binaries-location: bin
|
|
|
|
chmod: 0755
|
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-06-22 11:10:31 +03:00
|
|
|
# smoke dynamically links to icu4c, so a cached binary of smoke will break
|
|
|
|
# when brew bumps the icu4c version. In the following steps we use the
|
|
|
|
# icu4c version in the cache key of the smoke build to avoid this issue.
|
|
|
|
#
|
|
|
|
# NB: The smoke build cannot be done as a separate job because the smoke
|
|
|
|
# binary must be built using exactly the same version of the macos-12
|
|
|
|
# runner image as the smoke testing step to make sure that the icu4c
|
|
|
|
# versions match.
|
|
|
|
- name: Checkout smoke repo
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
repository: jonaprieto/smoke
|
|
|
|
ref: regex-icu
|
|
|
|
path: smoke-repo
|
|
|
|
|
|
|
|
- name: Install ICU4C
|
|
|
|
run: |
|
|
|
|
brew install icu4c
|
|
|
|
brew link icu4c --force
|
|
|
|
|
|
|
|
- name: Get ICU4C version
|
|
|
|
id: icuversion
|
|
|
|
run: |
|
|
|
|
ICUVERSION=$(echo -n $(brew list --versions icu4c | head -n 1 | sed -E 's/ /-/g'))
|
|
|
|
echo "version=$ICUVERSION" >> $GITHUB_OUTPUT
|
|
|
|
|
|
|
|
- name: Build smoke
|
|
|
|
env:
|
|
|
|
LDFLAGS: -L/usr/local/opt/icu4c/lib
|
|
|
|
CPPFLAGS: -I/usr/local/opt/icu4c/include
|
|
|
|
PKG_CONFIG_PATH: /usr/local/opt/icu4c/lib/pkgconfig
|
|
|
|
uses: freckle/stack-action@v4
|
|
|
|
with:
|
|
|
|
test: false
|
|
|
|
stack-arguments: --copy-bins
|
|
|
|
working-directory: smoke-repo
|
|
|
|
cache-prefix: ${{ steps.icuversion.outputs.version }}
|
|
|
|
pedantic: 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
|
|
|
- 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-05-22 20:49:36 +03:00
|
|
|
- name: Install VampIR for testing
|
|
|
|
uses: jaxxstorm/action-install-gh-release@v1.10.0
|
|
|
|
with:
|
2023-06-16 16:29:31 +03:00
|
|
|
repo: ${{ env.VAMPIRREPO }}
|
2023-05-22 20:49:36 +03:00
|
|
|
platform: darwin
|
2023-06-16 16:29:31 +03:00
|
|
|
tag: ${{ env.VAMPIRVERSION }}
|
2023-05-22 20:49:36 +03:00
|
|
|
chmod: 0755
|
|
|
|
rename-to: vamp-ir
|
|
|
|
|
|
|
|
- name: Test VampIR
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
vamp-ir --version
|
|
|
|
|
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() }}
|
2023-05-19 18:33:56 +03:00
|
|
|
shell: bash
|
2023-03-23 11:57:38 +03:00
|
|
|
run: |
|
|
|
|
cd main
|
2023-05-19 18:33:56 +03:00
|
|
|
make check-format-juvix-files && make typecheck-juvix-examples
|
2023-03-23 11:57:38 +03:00
|
|
|
|
2023-09-01 14:37:06 +03:00
|
|
|
# Smoke tests make git commits
|
|
|
|
- name: Setup git
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
git config --global user.email "tara-juvix@heliax.dev"
|
|
|
|
git config --global user.name "Tara"
|
|
|
|
git config --global init.defaultBranch 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
|
|
|
- name: Smoke testing (macOS)
|
|
|
|
id: smoke-macos
|
|
|
|
if: ${{ success() }}
|
|
|
|
run: |
|
|
|
|
cd main
|
|
|
|
make CC=$CC LIBTOOL=$LIBTOOL smoke
|