diff --git a/.github/workflows/colibri-core.yml b/.github/workflows/colibri-core.yml new file mode 100644 index 0000000..f40492e --- /dev/null +++ b/.github/workflows/colibri-core.yml @@ -0,0 +1,90 @@ +name: C/C++/Cython/Python CI + +on: + push: + branches: [master] + paths: + - '*.py' + - '*.pyx' + - '*.pxd' + - '.github/**' + + pull_request: + branches: [master] + +jobs: + notification: + runs-on: ubuntu-latest + name: Notify start to ##gitlama + steps: + - name: IRC notification + uses: Gottox/irc-message-action@v1 + with: + server: irc.uvt.nl + channel: '#gitlama' + nickname: GitHub + message: |- + ${{ github.actor }} started a build of colibri-core + + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + compiler: [g++] + + steps: + - uses: actions/checkout@v2 + - name: Install Build Environment + run: | + if [ "$RUNNER_OS" == "Linux" ]; then + sudo apt-get install pkg-config autoconf-archive + fi + - name: Install Dependencies + run: | + if [ "$RUNNER_OS" == "Linux" ]; then + sudo apt-get install python3 cython3 python3-lxml python3-pip + fi + + - name: build and install Colibri-Core + env: + CXX: ${{ matrix.compiler }} + run: sudo pip3 install --prefix /usr/local/ . + + - name: check + env: + CXX: ${{ matrix.compiler }} + run: LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib colibri-test + continue-on-error: true + + - name: check-python + env: + CXX: ${{ matrix.compiler }} + run: LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib python test.py + continue-on-error: true + + - name: check-python-2 + env: + CXX: ${{ matrix.compiler }} + run: LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib cd exp && ./colibri-patternmodeller-test.sh + continue-on-error: true + + - name: Notify IRC of failure + if: ${{ failure() }} + uses: Gottox/irc-message-action@v1 + with: + server: irc.uvt.nl + channel: '#gitlama' + nickname: GitHub + message: |- + Building colibri-core with ${{ matrix.compiler }} by ${{ github.actor }} on ${{ matrix.os }}: FAILED + + - name: Notify IRC of success + if: ${{ success() }} + uses: Gottox/irc-message-action@v1 + with: + server: irc.uvt.nl + channel: '#gitlama' + nickname: GitHub + message: |- + Building colibri-core with ${{ matrix.compiler }} by ${{ github.actor }} on ${{ matrix.os }}: SUCCESS