@@ -30,15 +30,34 @@ jobs:
3030 cxx : " g++" ,
3131 generators : " Unix Makefiles"
3232 }
33+ - { name: "CentOS-7-GCC",
34+ os_desc : centos7,
35+ image : " cookpa/antscentos7base" ,
36+ build_type : " Release" ,
37+ cc : " gcc" ,
38+ cxx : " g++" ,
39+ generators : " Unix Makefiles"
40+ }
3341 - {
3442 name : " Ubuntu-18.04-GCC" ,
3543 os_desc : ubuntu18.04,
44+ ubuntu_repo_label : " bionic" ,
3645 image : " ubuntu:18.04" ,
3746 build_type : " Release" ,
3847 cc : " gcc" ,
3948 cxx : " g++" ,
4049 generators : " Ninja"
4150 }
51+ - {
52+ name : " Ubuntu-20.04-GCC" ,
53+ os_desc : ubuntu20.04,
54+ image : " ubuntu:20.04" ,
55+ ubuntu_repo_label : " focal" ,
56+ build_type : " Release" ,
57+ cc : " gcc" ,
58+ cxx : " g++" ,
59+ generators : " Ninja"
60+ }
4261 steps :
4362 - uses : actions/checkout@v4
4463 with :
7392 gcc --version
7493 "
7594 - name : Install dependencies on Ubuntu
76- if : startsWith(matrix.config.name, 'Ubuntu-18.04 ')
95+ if : startsWith(matrix.config.name, 'Ubuntu')
7796 run : |
7897 docker exec --user root build_container bash -c "
98+ export DEBIAN_FRONTEND=noninteractive
7999 apt-get update
80100 apt-get install -y --no-install-recommends \
81101 apt-transport-https \
@@ -89,16 +109,16 @@ jobs:
89109 wget \
90110 zip
91111 wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | apt-key add -
92- apt-add-repository -y 'deb https://apt.kitware.com/ubuntu/ bionic main'
112+ apt-add-repository -y 'deb https://apt.kitware.com/ubuntu/ ${{ matrix.config.ubuntu_repo_label }} main'
93113 apt-get update
94- apt-get -y install cmake=${CMAKE_VERSION}-0kitware1ubuntu18.04. 1 cmake-data=${CMAKE_VERSION}-0kitware1ubuntu18.04 .1
114+ apt-get -y install cmake=${CMAKE_VERSION}-0kitware1${{ matrix.config.os_desc }}. 1 cmake-data=${CMAKE_VERSION}-0kitware1${{ matrix.config.os_desc }} .1
95115 ninja --version
96116 cmake --version
97117 gcc --version
98118 "
99- - name : Configure
119+ - name : Configure # Run with login shell to source bashrc, needed for centos
100120 run : |
101- docker exec --user root build_container bash -c "
121+ docker exec --user root build_container bash --login - c "
102122 mkdir -p /workspace/build
103123 cd /workspace/build
104124 cmake \
@@ -112,25 +132,25 @@ jobs:
112132 "
113133 - name : Build
114134 run : |
115- docker exec --user root build_container bash -c "
135+ docker exec --user root build_container bash --login - c "
116136 cd /workspace/build
117137 cmake --build . --config ${{ matrix.config.build_type }} --parallel 1
118138 "
119139 - name : Test
120140 run : |
121- docker exec --user root build_container bash -c "
141+ docker exec --user root build_container bash --login - c "
122142 cd /workspace/build/ANTS-build
123143 ctest
124144 "
125145 - name : Install
126146 run : |
127- docker exec --user root build_container bash -c "
147+ docker exec --user root build_container bash --login - c "
128148 cd /workspace/build/ANTS-build
129149 cmake --install .
130150 "
131151 - name : Pack
132152 run : |
133- docker exec --user root build_container bash -c "
153+ docker exec --user root build_container bash --login - c "
134154 cd /workspace/install
135155 zip -r /artifact/${{ env.ARTIFACT }} .
136156 "
0 commit comments