Skip to content

Commit

Permalink
enabled cmake ci
Browse files Browse the repository at this point in the history
  • Loading branch information
DiamonDinoia committed Jul 24, 2024
1 parent 44419b7 commit ef16690
Showing 1 changed file with 3 additions and 33 deletions.
36 changes: 3 additions & 33 deletions .github/workflows/cmake_ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: cmake ci linux macos windows
on:
push:
release:
types: [published]

on: [push, pull_request]

jobs:
prepare:
Expand All @@ -15,7 +13,7 @@ jobs:
- name: Generate matrix
id: generate_matrix
run: |
echo "MACOSX_DEPLOYMENT_TARGET=11.0" >> $GITHUB_ENV
echo "MACOSX_DEPLOYMENT_TARGET=11.0" >> $GITHUB_ENV
MATRIX=$(python3 ${{ github.workspace }}/.github/workflows/generate_cmake_matrix.py)
echo "matrix=$MATRIX" >> $GITHUB_OUTPUT
cmake-ci:
Expand Down Expand Up @@ -58,31 +56,3 @@ jobs:
working-directory: ./build
run: |
ctest -C ${{matrix.build_type}}
# may change to cpack and action-gh-release later
- name: Upload static and shared lib
if: startsWith(github.ref, 'refs/tags/') && github.event_name == 'release' && github.event.action == 'published' && matrix.build_type == 'Release'
uses: actions/upload-artifact@v4
with:
name: ${{matrix.os}}-${{matrix.compiler}}-finufft-lib
path: ${{runner.workspace}}/finufft/build/*finufft*

- name: Pack For Release
if: startsWith(github.ref, 'refs/tags/') && github.event_name == 'release' && github.event.action == 'published' && matrix.build_type == 'Release'
shell: bash
run: |
cd build
if [[ "${{ matrix.os }}" == "windows-2022" ]]
then
7z a ../${{matrix.os}}-${{matrix.compiler}}-finufft-lib.zip *finufft*
else
tar czvf ../${{matrix.os}}-${{matrix.compiler}}-finufft-lib.tar.gz *finufft*
fi
cd -
- name: Publish
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/') && github.event_name == 'release' && github.event.action == 'published'
with:
files: |
*-finufft-lib*

0 comments on commit ef16690

Please sign in to comment.