Skip to content

Commit 2f37fa5

Browse files
authored
Merge pull request #1846 from ANTsX/ci_update
CI: Move ubuntu 20.04 to Docker, revive Centos7
2 parents 4f60d79 + 600dc8d commit 2f37fa5

File tree

2 files changed

+29
-17
lines changed

2 files changed

+29
-17
lines changed

.github/workflows/release-binaries.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,6 @@ jobs:
3131
build_type: "Release",
3232
generators: "Ninja"
3333
}
34-
- {
35-
name: "Ubuntu-20.04-GCC",
36-
os: ubuntu-20.04,
37-
cc: "gcc",
38-
cxx: "g++",
39-
build_type: "Release",
40-
generators: "Ninja"
41-
}
4234
- {
4335
name: "Macos-14-clang",
4436
os: macos-14,

.github/workflows/release-docker-binaries.yml

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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:
@@ -73,9 +92,10 @@ jobs:
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

Comments
 (0)