Skip to content

Commit

Permalink
split workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-urban committed Apr 16, 2024
1 parent 0e7bb1e commit 475d24a
Showing 1 changed file with 3 additions and 137 deletions.
140 changes: 3 additions & 137 deletions .github/workflows/ci.yml → .github/workflows/ci-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: CC0-1.0

name: CI
name: win

on:
push:
Expand Down Expand Up @@ -50,81 +50,7 @@ concurrency:
#BUILD_TYPE: Release

jobs:
linux:
name: ci on ${{matrix.container}}
strategy:
fail-fast: false
matrix:
include:
- { container: 'ghcr.io/themachinethatgoesping/ubuntu-dep:latest',
ccache: 'true',
pip2: 'pip install -r requirements.txt --break-system-packages' }
- { container: 'ubuntu:22.04',
ccache: 'true',
pre-dep : 'apt update && apt-get install -y sudo git git-lfs',
dep : 'sudo DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential ccache pkg-config cmake python3-pip libboost-all-dev libcurl4-openssl-dev',
pip : 'pip install meson meson-python ninja pytest numpy',
pip2: 'pip install -r requirements.txt'}
- { container: 'archlinux',
pre-dep : 'pacman -Syu --noconfirm; pacman -Syy sudo git git-lfs --noconfirm',
dep : 'sudo pacman -Syy --noconfirm base-devel ccache pkg-config cmake python-pip boost curl',
pip : 'pip install meson meson-python ninja pytest numpy --break-system-packages',
pip2: 'pip install -r requirements.txt --break-system-packages' }

runs-on: ubuntu-latest
container: ${{matrix.container}}

steps:
- name: install perquisites
if: ${{matrix.pre-dep}}
run: ${{matrix.pre-dep}}

- name: checkout main repository
uses: actions/checkout@v3
with:
submodules: recursive
lfs: false

- name: ccache
if: ${{ matrix.ccache }}
uses: hendrikmuhs/[email protected]
with:
key: super-ci-${{ matrix.container }} # name for the cache

- name: install dependencies (c++)
if: ${{matrix.dep}}
run: ${{matrix.dep}}

- name: install dependencies (meson & python)
if: ${{matrix.pip}}
run: ${{matrix.pip}}

- name: configure meson
run: meson setup builddir/; meson configure builddir -Dpython.install_env=auto -Dprefix=/usr/;

- name: compile project
run: meson compile -C builddir/

- name: test (cpp)
run: meson test -C builddir/ --print-errorlogs

- name: install project
run: meson install -C builddir/

- name: install pip requirements
if: ${{matrix.pip2}}
run: ${{matrix.pip2}}

- name: test (pytest)
run: pytest -v

- uses: actions/upload-artifact@v1
if: failure()
with:
name: ${{matrix.container}}_testlog
path: builddir/meson-logs/testlog.txt



build-on-windows:
name: ci on windows
strategy:
Expand Down Expand Up @@ -156,7 +82,7 @@ jobs:
- name: setup python
uses: actions/setup-python@v3
with:
python-version: '3.11'
python-version: '3.12'

- name: Set up Clang
uses: egor-tensin/setup-clang@v1
Expand Down Expand Up @@ -240,63 +166,3 @@ jobs:
with:
name: Windows_Meson_testlog
path: builddir/meson-logs/testlog.txt

macos:
name: ci on macOS
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
cxx_compiler: ["$(brew --prefix llvm@16)/bin/clang++"]

# env does not work here because is resolved as string and not command
# env:
# CXX: ${{ matrix.cxx_compiler }}

steps:

- uses: actions/setup-python@v3
with:
python-version: '3.11'

- name: checkout main repository
uses: actions/checkout@v3
with:
submodules: recursive
lfs: false

- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: super-ci-mac # name for the cache

# install clang 15
- run: brew install coreutils llvm@16

- run: brew install libomp boost

- run: pip install meson meson-python ninja pytest numpy

- name: configure meson
run: CXX=${{ matrix.cxx_compiler }} meson setup builddir/; meson configure builddir -Dpython.install_env=auto

- name: compile project
run: meson compile -C builddir/

- name: test (cpp)
run: meson test -C builddir/ --print-errorlogs

- name: install project
run: meson install -C builddir/

- name: install pip requirements
run: pip install -r requirements.txt

- name: test (pytest)
run: pytest -v

- uses: actions/upload-artifact@v1
if: failure()
with:
name: ${{matrix.container}}_testlog
path: builddir/meson-logs/testlog.txt

0 comments on commit 475d24a

Please sign in to comment.