Skip to content

Commit

Permalink
Dependency installation on macos
Browse files Browse the repository at this point in the history
  • Loading branch information
reuterbal committed Mar 27, 2024
1 parent 7cb7200 commit a541c70
Showing 1 changed file with 27 additions and 9 deletions.
36 changes: 27 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,27 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: Refresh package lists
- name: Refresh package lists and install Loki dependencies
run: |
sudo apt-get -o Acquire::Retries=3 update || true
- name: Install Loki dependencies
run: |
sudo apt-get -o Acquire::Retries=3 install -y graphviz gfortran
- name: Install OMNI + CLAW dependencies
if [[ "${{ matrix.os }}" =~ macos ]]; then
brew install gcc@13 graphviz
else
sudo apt-get -o Acquire::Retries=3 update || true
sudo apt-get -o Acquire::Retries=3 install -y graphviz gfortran
fi
- name: Install OMNI + CLAW dependencies on Linux
if: ${{ ! startsWith(matrix.os, 'macos') }}
run: |
sudo apt-get -o Acquire::Retries=3 install -y byacc flex openjdk-11-jdk cmake ant
- name: Install Loki
run: |
./install --with-claw --with-ofp --with-examples --with-tests --with-dace
if [[ "${{ matrix.os }}" =~ macos ]]; then
./install --with-examples --with-tests --with-dace
else
./install --with-claw --with-ofp --with-examples --with-tests --with-dace
fi
- name: Install up-to-date CMake
run: |
Expand All @@ -78,33 +84,45 @@ jobs:
- name: Run Loki tests
run: |
if [[ "${{ matrix.os }}" =~ macos ]]; then
PATH=/opt/homebrew/bin:${PATH}
fi
source loki-activate
pytest --cov=./loki --cov-report=xml tests
- name: Upload loki coverage report to Codecov
uses: codecov/codecov-action@v4
if: ${{ ! startsWith(matrix.os, 'macos') }}
with:
flags: loki
files: ./coverage.xml

- name: Run transformations tests
run: |
if [[ "${{ matrix.os }}" =~ macos ]]; then
PATH=/opt/homebrew/bin:${PATH}
fi
source loki-activate
pytest --cov=transformations/transformations --cov-report=xml transformations/tests
- name: Upload transformations coverage report to Codecov
uses: codecov/codecov-action@v4
if: ${{ ! startsWith(matrix.os, 'macos') }}
with:
flags: transformations
files: ./coverage.xml

- name: Run lint_rules tests
run: |
if [[ "${{ matrix.os }}" =~ macos ]]; then
PATH=/opt/homebrew/bin:${PATH}
fi
source loki-activate
pytest --cov=lint_rules/lint_rules --cov-report=xml lint_rules/tests
- name: Upload lint_rules coverage report to Codecov
uses: codecov/codecov-action@v4
if: ${{ ! startsWith(matrix.os, 'macos') }}
with:
flags: lint_rules
files: ./coverage.xml

0 comments on commit a541c70

Please sign in to comment.