Skip to content
Snippets Groups Projects
Commit 1894d7b4 authored by Abhinav Singh's avatar Abhinav Singh
Browse files

Adding testing to yml

parent b3349cfa
No related branches found
No related tags found
No related merge requests found
...@@ -32,6 +32,8 @@ jobs: ...@@ -32,6 +32,8 @@ jobs:
echo "$HOME/ccache-4.8-linux-x86_64/" >> $GITHUB_PATH echo "$HOME/ccache-4.8-linux-x86_64/" >> $GITHUB_PATH
- name: ccache - name: ccache
uses: hendrikmuhs/ccache-action@v1.2 uses: hendrikmuhs/ccache-action@v1.2
with:
append-timestamp: false
- name: Build and Pack - name: Build and Pack
run: | run: |
export PATH="~/ccache-4.8-linux-x86_64/:$PATH" export PATH="~/ccache-4.8-linux-x86_64/:$PATH"
...@@ -45,7 +47,6 @@ jobs: ...@@ -45,7 +47,6 @@ jobs:
cd build cd build
printf " -DCPACK_RUN_INSTALL_DEPENDENCIES=ON" >> cmake_build_options; printf " -DCPACK_RUN_INSTALL_DEPENDENCIES=ON" >> cmake_build_options;
bash cmake_build_options; bash cmake_build_options;
yum install rpm-build
echo "Calling CPACK" echo "Calling CPACK"
cpack -G RPM centos cpack -G RPM centos
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
...@@ -61,8 +62,85 @@ jobs: ...@@ -61,8 +62,85 @@ jobs:
- name: Upload Artifact - name: Upload Artifact
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: openfpm_macos name: openfpm_nightly_builds
path: build/openfpm-nightly-Linux-x86_64.rpm path: build/openfpm-nightly-Linux-x86_64.rpm
- name: Single-core Test
run: |
source $HOME/openfpm_vars
export OMP_NUM_THREADS=1
./run.sh $(pwd) unused 1 pdata 0 ${{ github.ref }}
cd openfpm_numerics
./run.sh $(pwd) unused 1 0 0 numerics ${{ github.ref }}
- name: Multi-core Test
run: |
source $HOME/openfpm_vars
export OMP_NUM_THREADS=1
./run.sh $(pwd) unused 2 pdata 0 ${{ github.ref }}
cd openfpm_numerics
./run.sh $(pwd) unused 2 0 0 numerics ${{ github.ref }}
build_ubuntu:
runs-on: ubuntu-latest
- name: Install dependencies
run: |
apt-get -y update
apt-get -y install cmake wget git g++ gfortran python2 python-is-python3
- uses: actions/checkout@v3
with:
submodules: true
- name: Restore Cache dependencies
uses: actions/cache/restore@v3
with:
path: ~/openfpm_dependencies/
key: almalinux-dep-${{ github.ref }}
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
append-timestamp: false
- name: Build and Pack
run: |
export PATH="~/ccache-4.8-linux-x86_64/:$PATH"
git config --global safe.directory '*'
./build.sh $(pwd) unused pdata 0 ${{ github.ref }}
cp $HOME/openfpm_vars $HOME/openfpm_dependencies/openfpm_pdata/${{ github.ref }}
cp $HOME/.openfpm.mk $HOME/openfpm_dependencies/openfpm_pdata/${{ github.ref }}
export DEP_PACKING=$HOME/openfpm_dependencies/openfpm_pdata/${{ github.ref }}
ln -s ./LICENSE.md LICENSE.txt
ln -s ./README.md README.txt
cd build
printf " -DCPACK_RUN_INSTALL_DEPENDENCIES=ON" >> cmake_build_options;
bash cmake_build_options;
echo "Calling CPACK"
cpack -G DEB debian
if [ $? -ne 0 ]; then
echo "Error creating package"
exit 1
fi
mv openfpm_pdata-*-Linux.deb openfpm-nightly-Linux-x86_64.deb
- uses: actions/cache/save@v3
if: always()
with:
path: ~/openfpm_dependencies/
key: almalinux-dep-${{ github.ref }}
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: openfpm_nightly_builds
path: build/openfpm-nightly-Linux-x86_64.deb
- name: Single-core Test
run: |
source $HOME/openfpm_vars
export OMP_NUM_THREADS=1
./run.sh $(pwd) unused 1 pdata 0 ${{ github.ref }}
cd openfpm_numerics
./run.sh $(pwd) unused 1 0 0 numerics ${{ github.ref }}
- name: Multi-core Test
run: |
source $HOME/openfpm_vars
export OMP_NUM_THREADS=1
./run.sh $(pwd) unused 2 pdata 0 ${{ github.ref }}
cd openfpm_numerics
./run.sh $(pwd) unused 2 0 0 numerics ${{ github.ref }}
build_macos: build_macos:
runs-on: macos-latest runs-on: macos-latest
...@@ -77,6 +155,8 @@ jobs: ...@@ -77,6 +155,8 @@ jobs:
submodules: true submodules: true
- name: ccache - name: ccache
uses: hendrikmuhs/ccache-action@v1.2 uses: hendrikmuhs/ccache-action@v1.2
with:
append-timestamp: false
- name: Restore Cache dependencies - name: Restore Cache dependencies
uses: actions/cache/restore@v3 uses: actions/cache/restore@v3
with: with:
...@@ -110,5 +190,23 @@ jobs: ...@@ -110,5 +190,23 @@ jobs:
- name: Upload Artifact - name: Upload Artifact
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: openfpm_macos name: openfpm_nightly_builds
path: build/openfpm-nightly-Darwin-x86_64.pkg path: build/openfpm-nightly-Darwin-x86_64.pkg
- name: Single-core Test
run: |
export CC=gcc-12
export CXX=g++-12
source $HOME/openfpm_vars
export OMP_NUM_THREADS=1
./run.sh $(pwd) unused 1 pdata 0 ${{ github.ref }}
cd openfpm_numerics
./run.sh $(pwd) unused 1 0 0 numerics ${{ github.ref }}
- name: Multi-core Test
run: |
export CC=gcc-12
export CXX=g++-12
source $HOME/openfpm_vars
export OMP_NUM_THREADS=1
./run.sh $(pwd) unused 2 pdata 0 ${{ github.ref }}
cd openfpm_numerics
./run.sh $(pwd) unused 2 0 0 numerics ${{ github.ref }}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment