Skip to content

Commit

Permalink
import first version of workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
N-Coder committed Apr 13, 2024
1 parent 49f5d9a commit f5e218b
Show file tree
Hide file tree
Showing 2 changed files with 132 additions and 0 deletions.
129 changes: 129 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
name: Test cppyy packages

on:
workflow_dispatch:
env:
description: 'Additional variables to be appended to environment by writing them to $GITHUB_ENV.'
required: true
default: ''
type: string
ver-cppyy:
description: 'Version of cppyy to use.'
required: true
default: 'nightly'
type: string
ver-cppyy-cling:
description: 'Version of cppyy-cling to use.'
required: true
default: 'nightly'
type: string
ver-cppyy-backend:
description: 'Version of cppyy-backend to use.'
required: true
default: 'nightly'
type: string
ver-CPyCppyy:
description: 'Version of CPyCppyy to use.'
required: true
default: 'nightly'
type: string
ver-python
description: 'Version of Python to use.'
required: true
default: '3.x'
type: string

defaults:
run:
shell: bash

jobs:
test:
name: Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-14, macos-13, windows-latest ]

steps:

- name: Set environment variables
# see https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable
run: echo "${{ inputs.env }}" >> "$GITHUB_ENV"

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.ver-python }}

- name: Get python info
run: python3 -VV


- name: Install cppyy-cling nightly
run: |
# curl -sSf $(curl -sSf https://api.github.com/repos/wlav/cppyy-backend/actions/artifacts?per_page=1 | jq -r ".artifacts[0].archive_download_url") -o cppyy-backend.zip
curl -sSfL https://nightly.link/wlav/cppyy-backend/workflows/cling-wheels/master/artifact.zip -o cppyy-cling.zip
unzip cppyy-cling.zip -d cppyy-cling
pip3 install cppyy-cling --no-index --no-deps --find-links ./cppyy-cling
if: ${{ inputs.ver-cppyy-cling == 'nightly' }}

- name: Install cppyy-cling from pip
run: |
pip3 install cppyy-cling${{ inputs.ver-cppyy-cling }} --no-deps
if: ${{ inputs.ver-cppyy-cling != 'nightly' }}


- name: Install cppyy-backend nightly
run: |
pip3 install git+https://github.com/wlav/cppyy-backend.git#subdirectory=clingwrapper --no-deps
if: ${{ inputs.ver-cppyy-backend == 'nightly' }}

- name: Install cppyy-backend from pip
run: |
pip3 install cppyy-backend${{ inputs.ver-cppyy-backend }} --no-deps
if: ${{ inputs.ver-cppyy-backend != 'nightly' }}


- name: Install CPyCppyy nightly
run: |
pip3 install git+https://github.com/wlav/CPyCppyy.git --no-deps
if: ${{ inputs.ver-CPyCppyy == 'nightly' }}

- name: Install CPyCppyy from pip
run: |
pip3 install CPyCppyy${{ inputs.ver-CPyCppyy }} --no-deps
if: ${{ inputs.ver-CPyCppyy != 'nightly' }}


- name: Install cppyy nightly
run: |
pip3 install git+https://github.com/wlav/cppyy.git --no-deps
if: ${{ inputs.ver-cppyy == 'nightly' }}

- name: Install cppyy from pip
run: |
pip3 install cppyy${{ inputs.ver-cppyy }} --no-deps
if: ${{ inputs.ver-cppyy != 'nightly' }}


- name: Get installed packages info
run: pip3 freeze

- name: Check C++ version used by cppyy
run: python3 -c "import cppyy; cppyy.cppexec('std::cout << __GLIBCXX__ << std::endl;')"


- name: Get cpyyy test suite
uses: actions/checkout@v4
with:
repository: 'wlav/cppyy'
sparse-checkout: 'test/'

- name: Install pytest
run: pip3 install pytest

- name: Run pytest suite
run: pytest
working-directory: ./test
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# GitHub Actions CI for cppyy

This repo provides a GitHub Actions CI workflow that tests cppyy on different systems.

0 comments on commit f5e218b

Please sign in to comment.