Skip to content

Build aleph lang.

Build aleph lang. #116

Workflow file for this run

name: Build aleph lang.
on:
push:
branches:
- main
- release/*
pull_request:
branches:
- main
- release/*
schedule:
- cron: '0 3 * * 0' # every Sunday at 3 am.
workflow_dispatch:
jobs:
build-dotnet:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Set up .NET Core
uses: actions/setup-dotnet@main
with:
dotnet-version: '6.x'
include-prerelease: true
- name: Install fantomas (linter)
run: dotnet tool install -g fantomas
- name: Lint with fantomas
run: |
echo
echo "If fantomas fails, run fantomas without '--check' locally and commit the changes..."
echo
fantomas src/lang src/tests/ examples/fsharp
- name: Build with dotnet
run: dotnet build src/aleph.sln
- name: Test projects
run: dotnet test src/aleph.sln
- name: Pack projects
run: dotnet pack src/aleph.sln -c Release -o bin
- name: Run examples
working-directory: examples/fsharp
run: dotnet run
build-python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Set Python 3.9
uses: actions/setup-python@main
with:
python-version: '3.9'
- name: Install Python dependencies
working-directory: src/python
run: |
python -m pip install --upgrade pip
pip install ruff pytest
- name: Lint with ruff
working-directory: src/python
run: ruff check --output-format=github --ignore E501,F401 --target-version=py39 .
- name: Install aleph locally
working-directory: src/python
run: pip install -e .
- name: Check installed packages
run: pip freeze
- name: Test with pytest
working-directory: src/python
run: |
which python
which pip
which pytest
pytest
- name: Lint examples
working-directory: examples/python
run: ruff check --output-format=github --ignore E402 --target-version=py39 .
- name: Run examples
working-directory: examples/python
run: python ./examples.py