Skip to content

Commit

Permalink
CI: add macos-latest test for third party code compilation (lfortra…
Browse files Browse the repository at this point in the history
  • Loading branch information
Pranavchiku authored Jul 11, 2024
1 parent 1685339 commit fc1a802
Showing 1 changed file with 52 additions and 7 deletions.
59 changes: 52 additions & 7 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -467,19 +467,27 @@ jobs:
third_party_code_compile:
name: Check Third Party Code Compilation
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["macos-latest", "ubuntu-latest"]
python-version: ["3.10"]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: mamba-org/[email protected]
with:
environment-file: ci/environment_linux.yml
environment-file: ci/environment.yml
create-args: >-
python=3.10
python=${{ matrix.python-version }}
bison=3.4
openblas=0.3.21
llvm-openmp=11.1.0
llvm-openmp=14.0.4
cmake=3.26.4
make=4.3
- uses: hendrikmuhs/ccache-action@main
with:
Expand All @@ -488,6 +496,7 @@ jobs:

- name: Build Linux
shell: bash -e -l {0}
if: contains(matrix.os, 'ubuntu')
run: |
./build0.sh
cmake . -GNinja \
Expand All @@ -502,6 +511,13 @@ jobs:
cmake --build . -j16 --target install
- name: Build MacOS
shell: bash -e -l {0}
if: contains(matrix.os, 'macos')
run: |
./build0.sh
./build1.sh
- name: Test Legacy Minpack (SciPy)
shell: bash -e -x -l {0}
run: |
Expand Down Expand Up @@ -564,8 +580,9 @@ jobs:
make -f Makefile.manual F90="lfortran --skip-pass=inline_function_calls,fma --fast"
make -f Makefile.manual test
- name: Test fastGPT
- name: Test fastGPT ( ubuntu-latest )
shell: bash -e -x -l {0}
if: contains(matrix.os, 'ubuntu')
run: |
git clone https://github.com/certik/fastGPT.git
cd fastGPT
Expand Down Expand Up @@ -634,9 +651,34 @@ jobs:
./test_more_inputs
cd ..
rm -rf fastGPT/
- name: Test fastGPT ( macos-latest )
shell: bash -e -x -l {0}
if: contains(matrix.os, 'macos')
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=$(pwd)/../../src/bin/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 ..
- name: Test fpm
shell: bash -e -x -l {0}
if: contains(matrix.os, 'ubuntu')
run: |
git clone https://github.com/certik/fpm.git
cd fpm
Expand All @@ -654,8 +696,11 @@ jobs:
git checkout lf20
git checkout abb1d33d6ae02d8b62a13be7f9e51f6117c67ba4
micromamba install -c conda-forge fypp
./build_test_lf.sh
micromamba install -c conda-forge fypp gfortran
git clean -fdx
FC=lfortran cmake . -DTEST_DRIVE_BUILD_TESTING=OFF -DBUILD_EXAMPLE=ON -DCMAKE_Fortran_COMPILER_WORKS=TRUE -DCMAKE_Fortran_FLAGS="--cpp --realloc-lhs"
make -j8
ctest
./build_test_gf.sh
- name: Test SNAP
Expand Down

0 comments on commit fc1a802

Please sign in to comment.