diff --git a/.gitea/workflows/action.yaml b/.gitea/workflows/action.yaml index a1043d7..f35c575 100644 --- a/.gitea/workflows/action.yaml +++ b/.gitea/workflows/action.yaml @@ -2,7 +2,7 @@ name: CI on: push: - branches: [ "main" ] + branches: [ "main", "ci" ] jobs: build-and-test: diff --git a/README.md b/README.md index 7d2e3d3..67fbd06 100644 --- a/README.md +++ b/README.md @@ -171,4 +171,16 @@ ctest --test-dir build The source code for the test binary is in `test/m_epics_ca_test.cxx`. This file can also serve as a collection of examples for different record types, like -`longin`, `ao`, `bo`, `stringin`, `waveform`, ... . \ No newline at end of file +`longin`, `ao`, `bo`, `stringin`, `waveform`, ... . + +## CI + +In CI, this test is run in the Docker container `lin/midas_base_gitea`. To +manually run tests in the CI environment, log into the runner machine and use + +```bash +sudo docker run --rm -it -v "$PWD":/workspace -w /workspace lin/midas_base_gitea bash +``` + +Please note that `EPICS_HOST_ARCH` is `linux-x86_64` within that container! +Therefore, that environment variable must not be set explicitly within the test. \ No newline at end of file diff --git a/test/ioc/st.cmd b/test/ioc/st.cmd index 87c061f..23d63bc 100755 --- a/test/ioc/st.cmd +++ b/test/ioc/st.cmd @@ -6,3 +6,5 @@ iocInit() # Initialize the waveform record dbpf("MEPICSCA:TEST:WAVEFORM", "ABC") + +echo "IOC running" diff --git a/test/ioc/startioc b/test/ioc/startioc index 073e6ef..dab6f7d 100755 --- a/test/ioc/startioc +++ b/test/ioc/startioc @@ -1,6 +1,10 @@ #!/usr/bin/env bash + +# Note: EPICS_HOST_ARCH is not RHEL8-x86_64 in the CI docker container +# (lin/midas_base_gitea), but linux-x86_64. So we do not specify it here, but +# rely on the inherited environment. + export EPICS_BASE=/usr/local/epics/base-7.0.7 -export EPICS_HOST_ARCH=RHEL8-x86_64 export EPICS_CA_AUTO_ADDR_LIST=NO export EPICS_CAS_INTF_ADDR_LIST=127.0.0.1 export EPICS_CA_ADDR_LIST=127.0.0.1 @@ -10,4 +14,5 @@ export EPICS_CA_SERVER_PORT=5064 cd "$(dirname "$0")" export IOCDIR=$(pwd) -exec ./st.cmd +# In CI, we absolutely do not want an interactive shell! +exec "$EPICS_BASE/bin/$EPICS_HOST_ARCH/softIoc" -S st.cmd