diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000..2db2ba4 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,72 @@ +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: | + mkdir ~/.ssh + chmod 700 ~/.ssh + ssh-keyscan github.com >> ~/.ssh/known_hosts + eval "$(ssh-agent -s)" + + git clone git@github.com:lcompilers/lpython.git + git fetch --tags -f + git checkout v0.20.0 + + - 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 diff --git a/environment.yml b/environment.yml new file mode 100644 index 0000000..c2442cb --- /dev/null +++ b/environment.yml @@ -0,0 +1,9 @@ +name: lf +channels: + - conda-forge +dependencies: + - python=3.10 + - lpython=0.20.0 + - nodejs=18.12.1 + - make=4.3 + - cmake=3.25.2