Skip to content

Add test to install Python wrapper #2

Add test to install Python wrapper

Add test to install Python wrapper #2

Workflow file for this run

# Author: Humberto Munoz Bauza (humberto.munozbauza@nasa.gov)
#
# Copyright © 2024, United States Government, as represented by the Administrator
# of the National Aeronautics and Space Administration. All rights reserved.
#
# The PySA, a powerful tool for solving optimization problems is licensed under
# the Apache License, Version 2.0 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing, software distributed
# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
name: cdcl-tests
on:
push:
branches: ["main", "pysa-cdcl" ]
pull_request:
branches: ["main", "pysa-cdcl" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
build_type: [ Release, Debug ]
cpp_compiler: [ g++, clang++ ]
python-version: [3.8]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Configure CMake
run: >
cmake -B ${{github.workspace}}/build \
-S ${{ github.workspace }} \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
- name: Install Python wrapper
run: |
python -m pip install --upgrade pip
pip install .
- name: Build
run: cmake --build ${{github.workspace}}/build
--config ${{ matrix.build_type }}
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{ matrix.build_type }} --rerun-failed --output-on-failure