From 360d4517a0f57dbefca9bd28b7bc5b3227612c57 Mon Sep 17 00:00:00 2001 From: Jeremy Lorelli Date: Mon, 15 Jul 2024 14:10:20 -0700 Subject: [PATCH] gha test --- .github/workflows/build.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..2bbc74f --- /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.10-dev libyaml-cpp-dev + - name: Generate Local Config + run: | + echo "ARCHES=\$(HARCH)" > config.local.mak + echo "boostinc_DIR=/usr/include/" >> config.local.mak + echo "boostlib_DIR=/usr/lib/x86_64-linux-gnu" >> config.local.mak + echo "yaml_cppinc_DIR=/usr/include/" >> config.local.mak + echo "yaml_cpplib_DIR=/usr/lib/x86_64-linux-gnu" >> config.local.mak + echo "pyinc_DIR=/usr/include/python3.10" >> 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.