Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add clang build #21

Merged
merged 1 commit into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 24 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,27 @@ jobs:
linux:
strategy:
matrix:
py-version: ['3.10', '3.11']
include:
- py-version: '3.10'
c-compiler: 'gcc'
cxx-compiler: 'g++'
- py-version: '3.11'
c-compiler: 'gcc'
cxx-compiler: 'g++'
- py-version: '3.10'
c-compiler: 'clang'
cxx-compiler: 'clang++'
fail-fast: false
name: Python ${{ matrix.py-version }}
name: ${{ matrix.c-compiler}} Python ${{ matrix.py-version }}


runs-on: ubuntu-latest
timeout-minutes: 180
env:
MPIEXEC_FLAGS: "--allow-run-as-root --oversubscribe"
PYNUCLEUS_BUILD_PARALLELISM: 2
OMPI_CC: ${{ matrix.c-compiler }}
OMPI_CXX: ${{ matrix.cxx-compiler }}

steps:
- name: Check out repo
Expand All @@ -34,7 +45,7 @@ jobs:
uses: actions/cache/restore@v3
with:
path: /home/runner/.cache/ccache
key: ccache-${{ matrix.py-version }}
key: ccache-${{ matrix.c-compiler }}-${{ matrix.py-version }}

- uses: actions/setup-python@v4
if: always()
Expand All @@ -57,7 +68,7 @@ jobs:

- name: Install
if: always()
run: python -m pip install wheel && python -m pip list && make install PIP_INSTALL_FLAGS="--no-use-pep517"
run: python -m pip install wheel && python -m pip list && make install PIP_INSTALL_FLAGS="--no-use-pep517 -vvv"

- name: Remove ccache cache
if: ${{ steps.ccache-restore.outputs.cache-hit }}
Expand All @@ -66,51 +77,51 @@ jobs:
GH_TOKEN: ${{ github.token }}
run: |
gh extension install actions/gh-actions-cache
gh actions-cache delete ccache-${{ matrix.py-version }} --confirm
gh actions-cache delete ccache-${{ matrix.c-compiler}}-${{ matrix.py-version }} --confirm
continue-on-error: true

- name: Push ccache cache
if: always()
uses: actions/cache/save@v3
with:
path: /home/runner/.cache/ccache
key: ccache-${{ matrix.py-version }}
key: ccache-${{ matrix.c-compiler }}-${{ matrix.py-version }}

- name: Ccache report
if: always()
run: ccache -s

- name: Run tests
if: always()
run: python3 -m pytest --junit-xml=test-results-${{ matrix.py-version }}.xml tests/
run: python3 -m pytest --junit-xml=test-results-${{ matrix.c-compiler }}-${{ matrix.py-version }}.xml tests/

- name: Run flake8
if: always()
run: |
make flake8
mv flake8.xml flake8-${{ matrix.py-version }}.xml
mv flake8.xml flake8-${{ matrix.c-compiler }}-${{ matrix.py-version }}.xml

- name: Archive test results
uses: actions/upload-artifact@v3
if: always()
with:
name: Test results
path: test-results-${{ matrix.py-version }}.xml
path: test-results-${{ matrix.c-compiler }}-${{ matrix.py-version }}.xml

- name: Report test results
uses: dorny/test-reporter@v1
if: always()
with:
name: Test report (Python ${{ matrix.py-version }})
path: test-results-${{ matrix.py-version }}.xml
name: Test report (${{ matrix.c-compiler }}, Python ${{ matrix.py-version }})
path: test-results-${{ matrix.c-compiler }}-${{ matrix.py-version }}.xml
reporter: java-junit
fail-on-error: true

- name: Report flake8 results
uses: dorny/test-reporter@v1
if: always()
with:
name: Flake8 report (Python ${{ matrix.py-version }})
path: flake8-${{ matrix.py-version }}.xml
name: Flake8 report (${{ matrix.c-compiler }}, Python ${{ matrix.py-version }})
path: flake8-${{ matrix.c-compiler }}-${{ matrix.py-version }}.xml
reporter: java-junit
fail-on-error: false
Loading
Loading