CI: add working EPICS CI pipeline
This commit is contained in:
@@ -2,7 +2,7 @@ name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
branches: [ "main", "ci" ]
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
|
||||
@@ -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`, ... .
|
||||
`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.
|
||||
@@ -6,3 +6,5 @@ iocInit()
|
||||
|
||||
# Initialize the waveform record
|
||||
dbpf("MEPICSCA:TEST:WAVEFORM", "ABC")
|
||||
|
||||
echo "IOC running"
|
||||
|
||||
+7
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user