Update to LFortran 0.24.0 #35
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- 'v*' | |
pull_request: | |
branches: | |
- main | |
env: | |
LFORTRAN_VERSION: 0.24.0 | |
MACOSX_DEPLOYMENT_TARGET: 12.0 | |
jobs: | |
Build: | |
name: Conda-Forge LFortran 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 | |
create-args: >- | |
lfortran=${{ env.LFORTRAN_VERSION }} | |
- uses: hendrikmuhs/ccache-action@main | |
with: | |
variant: sccache | |
key: ${{ github.job }}-${{ matrix.os }} | |
- name: Print installed packages information | |
shell: bash -e -x -l {0} | |
run: | | |
which lfortran | |
micromamba env list | |
micromamba activate lf | |
micromamba list | |
which lfortran | |
- name: Clone LFortran Source Repository | |
shell: bash -e -x -l {0} | |
run: | | |
git clone https://github.com/lfortran/lfortran.git | |
cd lfortran | |
git fetch https://github.com/lfortran/lfortran.git --tags -f | |
git checkout v${{ env.LFORTRAN_VERSION }} | |
- name: Run LFortran Integration Tests | |
if: ${{ !startsWith(matrix.os, 'windows-2019') }} | |
shell: bash -e -x -l {0} | |
run: | | |
cd lfortran/integration_tests | |
./run_tests.py -b llvm wasm | |
- name: Run LFortran Fast Integration Tests | |
if: ${{ !startsWith(matrix.os, 'windows-2019') }} | |
shell: bash -e -x -l {0} | |
run: | | |
cd lfortran/integration_tests | |
./run_tests.py -b llvm wasm -f | |
- name: Run LFortran Reference Tests | |
if: ${{ !startsWith(matrix.os, 'windows-2019') }} | |
shell: bash -e -x -l {0} | |
run: | | |
cd lfortran | |
./run_tests.py --skip-run-with-dbg --no-llvm --skip-cpptranslate | |
third_party_code_compile: | |
name: Check Third Party Code Compilation ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["macos-latest", "ubuntu-latest"] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: environment.yml | |
create-args: >- | |
lfortran=${{ env.LFORTRAN_VERSION }} | |
python=3.10 | |
openblas=0.3.21 | |
llvm-openmp=14.0.4 | |
- name: Print installed packages information | |
shell: bash -e -x -l {0} | |
run: | | |
which lfortran | |
micromamba env list | |
micromamba activate lf | |
micromamba list | |
which lfortran | |
- uses: hendrikmuhs/ccache-action@main | |
with: | |
variant: sccache | |
key: ${{ github.job }}-ubuntu-latest | |
- name: Test Modern Minpack (Fortran-Lang) | |
shell: bash -e -x -l {0} | |
run: | | |
git clone https://github.com/fortran-lang/minpack modern_minpack_01 | |
cd modern_minpack_01 | |
git checkout c0b5aea9fcd2b83865af921a7a7e881904f8d3c2 | |
lfortran ./src/minpack.f90 -c --legacy-array-sections | |
lfortran ./examples/example_hybrd.f90 --legacy-array-sections | |
lfortran ./examples/example_hybrd1.f90 --legacy-array-sections | |
lfortran ./examples/example_lmdif1.f90 --legacy-array-sections | |
lfortran ./examples/example_lmder1.f90 --legacy-array-sections | |
- name: Test dftatom | |
shell: bash -e -x -l {0} | |
run: | | |
git clone https://github.com/czgdp1807/dftatom.git | |
cd dftatom | |
git checkout -t origin/lf38 | |
git checkout 046ae9b06dda7664ab1c71b6aecde48a03952f2d | |
export PATH="$(pwd)/../src/bin:$PATH" | |
make -f Makefile.manual | |
make -f Makefile.manual test | |
- name: Test fastGPT | |
shell: bash -e -x -l {0} | |
run: | | |
git clone https://github.com/certik/fastGPT.git | |
cd fastGPT | |
git clean -dfx | |
git checkout -t origin/namelist | |
git checkout d3eef520c1be8e2db98a3c2189740af1ae7c3e06 | |
curl -o model.dat -L https://huggingface.co/datasets/certik/fastGPT/resolve/main/model_fastgpt_124M_v1.dat | |
mkdir lf | |
cd lf | |
FC=lfortran CMAKE_PREFIX_PATH=$CONDA_PREFIX cmake -DFASTGPT_BLAS=OpenBLAS -DCMAKE_BUILD_TYPE=Debug .. | |
make VERBOSE=1 | |
ln -s ../model.dat . | |
./gpt2 | |
./test_basic_input | |
./test_more_inputs | |
cd .. | |
mkdir lf-fast | |
cd lf-fast | |
FC="lfortran --fast" CMAKE_PREFIX_PATH=$CONDA_PREFIX cmake -DFASTGPT_BLAS=OpenBLAS -DCMAKE_BUILD_TYPE=Release .. | |
make VERBOSE=1 | |
ln -s ../model.dat . | |
./gpt2 | |
./test_basic_input | |
./test_more_inputs | |
cd .. | |
test_scipy: | |
name: Check SciPy Build and Test Run ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-latest"] # test only on ubuntu for now | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: mamba-org/setup-micromamba@v1 | |
- uses: hendrikmuhs/ccache-action@main | |
with: | |
variant: sccache | |
key: ${{ github.job }}-ubuntu-latest | |
- name: Build SciPy | |
shell: bash -e -x -l {0} | |
run: | | |
git clone https://github.com/scipy/scipy | |
cd scipy | |
git remote add ondrej https://github.com/certik/scipy | |
git fetch ondrej | |
git checkout -t ondrej/merge_specfun_minpack_fitpack4 | |
git checkout 84ac735ae7a4071aee5cb84067e89530d55e27e2 | |
micromamba env create -f environment.yml | |
micromamba activate scipy-dev | |
micromamba install -c conda-forge lfortran=${{ env.LFORTRAN_VERSION }} | |
git submodule update --init | |
mkdir lfortran-build/ | |
cd lfortran-build/ | |
LIBRARY_PATH="$CONDA_PREFIX/share/lfortran/lib" | |
FC=lfortran cmake \ | |
-DCMAKE_Fortran_FLAGS=--verbose \ | |
-DLFORTRAN_RUNTIME_LIBRARY_PATH=$LIBRARY_PATH \ | |
.. | |
make install | |
cp $LIBRARY_PATH/liblfortran_runtime.* $CONDA_PREFIX/lib | |
cd ../ | |
python dev.py build | |
- name: Test SciPy Specfun | |
shell: bash -e -x -l {0} | |
run: | | |
cd scipy/ | |
micromamba activate scipy-dev | |
python dev.py test -t scipy.special -v | |
- name: Test SciPy Minpack | |
shell: bash -e -x -l {0} | |
run: | | |
cd scipy/ | |
micromamba activate scipy-dev | |
python dev.py test -t scipy.optimize -v | |
- name: Test SciPy Fitpack | |
shell: bash -e -x -l {0} | |
run: | | |
cd scipy/ | |
micromamba activate scipy-dev | |
python dev.py test -t scipy.interpolate -v |