From 6a544af84ac108acc74f0d1af21918f87861075d Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Sat, 23 Sep 2023 13:18:51 +0530 Subject: [PATCH 1/9] CI: Add initial version --- .github/workflows/CI.yml | 65 ++++++++++++++++++++++++++++++++++++++++ environment.yml | 9 ++++++ 2 files changed, 74 insertions(+) create mode 100644 .github/workflows/CI.yml create mode 100644 environment.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000..f003b34 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,65 @@ +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 git@github.com:lcompilers/lpython.git + + - 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..ea36aca --- /dev/null +++ b/environment.yml @@ -0,0 +1,9 @@ +name: lf +channels: + - conda-forge +dependencies: + - python=3.10 + - lpython=0.19.0 + - nodejs + - make + - cmake From 16e6f8f7d1fc02263545f197be629fd93f94b08c Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Sat, 23 Sep 2023 13:33:30 +0530 Subject: [PATCH 2/9] GitHub add ssh keys --- .github/workflows/CI.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f003b34..9e0e84f 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -35,6 +35,14 @@ jobs: variant: sccache key: ${{ github.job }}-${{ matrix.os }} + - name: GitHub add SSH Keys + shell: bash -e -l {0} + run: | + mkdir ~/.ssh + chmod 700 ~/.ssh + ssh-keyscan github.com >> ~/.ssh/known_hosts + eval "$(ssh-agent -s)" + - name: Clone LPython Source Repository shell: bash -e -l {0} run: | From ccf31dcb2d460517fb5646dc70e57f4495cb50fb Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Sat, 23 Sep 2023 13:35:40 +0530 Subject: [PATCH 3/9] Git: Instead use http to clone --- .github/workflows/CI.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 9e0e84f..a62ae61 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -35,18 +35,10 @@ jobs: variant: sccache key: ${{ github.job }}-${{ matrix.os }} - - name: GitHub add SSH Keys - shell: bash -e -l {0} - run: | - mkdir ~/.ssh - chmod 700 ~/.ssh - ssh-keyscan github.com >> ~/.ssh/known_hosts - eval "$(ssh-agent -s)" - - name: Clone LPython Source Repository shell: bash -e -l {0} run: | - git clone git@github.com:lcompilers/lpython.git + git clone https://github.com/lcompilers/lpython.git - name: Run LPython Ctest shell: bash -e -l {0} From 266f02e12f85da9a29e2673b990b2b9dd13b63f7 Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Sat, 23 Sep 2023 13:42:20 +0530 Subject: [PATCH 4/9] Use fixed LPython repository commit --- .github/workflows/CI.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a62ae61..af2ee23 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -39,6 +39,7 @@ jobs: shell: bash -e -l {0} run: | git clone https://github.com/lcompilers/lpython.git + git checkout 2293972e5ce377787d134541f8363ae441030b76 - name: Run LPython Ctest shell: bash -e -l {0} From bc8eacae7f21f48d25c3b350e8cfe87f433a6452 Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Sun, 24 Sep 2023 01:16:34 +0530 Subject: [PATCH 5/9] Use latest lpython v0.20.0 --- .github/workflows/CI.yml | 2 +- environment.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index af2ee23..2b0173e 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -39,7 +39,7 @@ jobs: shell: bash -e -l {0} run: | git clone https://github.com/lcompilers/lpython.git - git checkout 2293972e5ce377787d134541f8363ae441030b76 + git checkout v0.20.0 - name: Run LPython Ctest shell: bash -e -l {0} diff --git a/environment.yml b/environment.yml index ea36aca..85b2a65 100644 --- a/environment.yml +++ b/environment.yml @@ -3,7 +3,7 @@ channels: - conda-forge dependencies: - python=3.10 - - lpython=0.19.0 + - lpython=0.20.0 - nodejs - make - cmake From 9aa84c88eee6a30af68d6d0eb1cc28764354c96b Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Sun, 24 Sep 2023 01:18:30 +0530 Subject: [PATCH 6/9] CI: Use fixed version for dependencies --- environment.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/environment.yml b/environment.yml index 85b2a65..c2442cb 100644 --- a/environment.yml +++ b/environment.yml @@ -4,6 +4,6 @@ channels: dependencies: - python=3.10 - lpython=0.20.0 - - nodejs - - make - - cmake + - nodejs=18.12.1 + - make=4.3 + - cmake=3.25.2 From 2c0a49ba63ad8b4b16869f81c77c226bead7def2 Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Sun, 24 Sep 2023 08:27:36 +0530 Subject: [PATCH 7/9] Fetch tags before checkout --- .github/workflows/CI.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 2b0173e..80e54f4 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -39,6 +39,7 @@ jobs: shell: bash -e -l {0} run: | git clone https://github.com/lcompilers/lpython.git + git fetch --tags -f git checkout v0.20.0 - name: Run LPython Ctest From 1f43102d5b231a059098fc62032542fb881bffa0 Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Sun, 24 Sep 2023 08:30:18 +0530 Subject: [PATCH 8/9] Use ssh --- .github/workflows/CI.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 80e54f4..bfae36e 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -38,7 +38,14 @@ jobs: - name: Clone LPython Source Repository shell: bash -e -l {0} run: | - git clone https://github.com/lcompilers/lpython.git + mkdir ~/.ssh + chmod 700 ~/.ssh + ssh-keyscan gitlab.com >> ~/.ssh/known_hosts + 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 From 4f783fd97d510e0078cb9014fbd1249e1ee3fbce Mon Sep 17 00:00:00 2001 From: Shaikh Ubaid Date: Sun, 24 Sep 2023 08:32:29 +0530 Subject: [PATCH 9/9] tmp --- .github/workflows/CI.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index bfae36e..2db2ba4 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -40,9 +40,7 @@ jobs: run: | mkdir ~/.ssh chmod 700 ~/.ssh - ssh-keyscan gitlab.com >> ~/.ssh/known_hosts ssh-keyscan github.com >> ~/.ssh/known_hosts - eval "$(ssh-agent -s)" git clone git@github.com:lcompilers/lpython.git