diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..d62ca02 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,35 @@ + +on: ['pull_request', 'push'] + +jobs: + build: + name: Build + runs-on: ubuntu-22.04 + strategy: + matrix: + USE_CXX11: ['YES', 'NO'] + WITH_PYCPSW: ['BOOST', 'CYTHON'] + steps: + - uses: actions/checkout@v3 + - name: Install Dependencies + run: | + sudo apt-get install -y libboost-python-dev libtirpc-dev gcc g++ make cython3 python3-dev libyaml-cpp-dev + - name: Generate Local Config + run: | + echo "ARCHES=$(HARCH)" > config.local.mak + echo "boostinc_DIR=/usr/local/include/" >> config.local.mak + echo "boostlib_DIR=/usr/local/lib/" >> config.local.mak + echo "yaml_cppinc_DIR=/usr/local/include/" >> config.local.mak + echo "yaml_cpplib_DIR=/usr/local/lib/" >> config.local.mak + echo "pyinc_DIR=/usr/local/include/python3.6m/" >> config.local.mak + echo "USE_TIRPC=YES" >> config.local.mak + echo "USE_CXX11_default=${{ matrix.USE_CXX11 }}" >> config.local.mak + echo "WITH_PYCPSW=${{ matrix.WITH_PYCPSW }}" >> config.local.mak + - name: Build and Install + run: make && make install + - name: Test + run: | + source env.slac.sh # Setup the enviroment. + udpsrv -S0 -L0 & # Start udpsrv in the background. + make test # Run the tests. + python3 -c "import pycpsw" # Test to import the python wrapper.