Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Add initial version #2

Merged
merged 9 commits into from
Sep 24, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: CI

on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
branches:
- main

env:
MACOSX_DEPLOYMENT_TARGET: 12.0

jobs:
Build:
name: Conda-Forge LPython Test ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["windows-2019", "macos-latest", "ubuntu-latest"]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment.yml

- uses: hendrikmuhs/ccache-action@main
with:
variant: sccache
key: ${{ github.job }}-${{ matrix.os }}

- name: Clone LPython Source Repository
shell: bash -e -l {0}
run: |
git clone https://github.com/lcompilers/lpython.git
git checkout 2293972e5ce377787d134541f8363ae441030b76
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For easiness of maintenance, perhaps here we can just checkout the corresponding "tag" from environment.yml, so:

git checkout v0.19.0

The git hash is more robust, but here I think we will be updating this version very often, so I think it's fine to use the tag. We assume that we do not change tags once published (we've never done that so far), so it should be robust.

In other cases when we use a branch, that is fragile, since branches move.


- name: Run LPython Ctest
shell: bash -e -l {0}
run: |
cd lpython
ctest

- name: Run LPython Integration Tests
shell: bash -e -l {0}
run: |
cd lpython/integration_tests
./run_tests.py -b llvm c wasm

- name: Run LPython Fast Integration Tests
shell: bash -e -l {0}
run: |
cd lpython/integration_tests
./run_tests.py -b llvm c wasm -f

- name: Run LPython Reference Tests
shell: bash -e -l {0}
run: |
cd lpython
./run_tests.py
9 changes: 9 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: lf
channels:
- conda-forge
dependencies:
- python=3.10
- lpython=0.19.0
- nodejs
- make
- cmake
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put exact versions for all dependencies.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, got it.