From ae96d82966b647c1ee600494a3076b0418f6cb7b Mon Sep 17 00:00:00 2001 From: Tom de Geus Date: Wed, 2 Mar 2022 17:34:17 +0100 Subject: [PATCH 1/3] CI: adding GitHub Actions runners --- .github/workflows/ci.yml | 85 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..c117bec --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,85 @@ +name: CI + +on: + workflow_dispatch: + pull_request: + push: + branches: + - master + +jobs: + + standard: + + strategy: + fail-fast: false + matrix: + runs-on: [ubuntu-latest, macos-latest, windows-latest] + + defaults: + run: + shell: bash -l {0} + + name: ${{ matrix.runs-on }} • x64 ${{ matrix.args }} + runs-on: ${{ matrix.runs-on }} + + steps: + + - name: Basic GitHub action setup + uses: actions/checkout@v2 + + - name: Set conda environment + uses: mamba-org/provision-with-micromamba@main + with: + environment-name: myenv + environment-file: environment-dev.yml + cache-env: true + + - name: Configure using CMake + run: cmake -Bbuild -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DPYTHON_EXECUTABLE=`which python` -DDOWNLOAD_GTEST=ON + + - name: Install + working-directory: build + run: make install + + - name: Build xtensor-python + working-directory: build + run: make test_xtensor_python + + - name: Test xtensor-python + working-directory: build/test + run: ./test_xtensor_python + + - name: Test xtensor-python (Python) + run: py.test -s + + - name: Example - readme 1 + working-directory: docs/source/examples/readme_example_1 + run: | + cmake -Bbuild -DPython_EXECUTABLE=`which python` + cd build + cmake --build . + cp ../example.py . + python example.py + cd .. + + - name: Example - Copy 'cast' + working-directory: docs/source/examples/copy_cast + run: | + cmake -Bbuild -DPython_EXECUTABLE=`which python` + cd build + cmake --build . + cp ../example.py . + python example.py + cd .. + + - name: Example - SFINAE + working-directory: docs/source/examples/sfinae + run: | + cmake -Bbuild -DPython_EXECUTABLE=`which python` + cd build + cmake --build . + cp ../example.py . + python example.py + cd .. + From afc8d95b36f27074a57553d422a5399efc5d77b7 Mon Sep 17 00:00:00 2001 From: Tom de Geus Date: Wed, 2 Mar 2022 17:36:56 +0100 Subject: [PATCH 2/3] Trying to trigger --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c117bec..8dc50d9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,8 +4,6 @@ on: workflow_dispatch: pull_request: push: - branches: - - master jobs: From 36cde019ed594c9802844e00412f89de0e4a5437 Mon Sep 17 00:00:00 2001 From: Tom de Geus Date: Wed, 2 Mar 2022 17:38:03 +0100 Subject: [PATCH 3/3] Reverting --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8dc50d9..c117bec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,6 +4,8 @@ on: workflow_dispatch: pull_request: push: + branches: + - master jobs: