Skip to content

Commit a3a800b

Browse files
committed
1 parent 75812db commit a3a800b

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

.github/workflows/build.yml

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -221,24 +221,26 @@ jobs:
221221
container: ${{ matrix.container }}
222222

223223
steps:
224-
- name: Check if running in container
225-
if: matrix.container != ''
226-
run: echo "GHA_CONTAINER=${{ matrix.container }}" >> $GITHUB_ENV
227-
- name: If running in container, upgrade packages
224+
- name: Setup container environment
228225
if: matrix.container != ''
229226
run: |
230-
apt-get -o Acquire::Retries=3 update && DEBIAN_FRONTEND=noninteractive apt-get -y install tzdata && apt-get -o Acquire::Retries=3 install -y sudo software-properties-common wget curl apt-transport-https make apt-file sudo unzip libssl-dev build-essential autotools-dev autoconf automake g++ libc++-helpers python ruby cpio gcc-multilib g++-multilib pkgconf python3 ccache libpython-dev locales
231-
sudo apt-add-repository ppa:git-core/ppa
232-
sudo apt-get -o Acquire::Retries=3 update && apt-get -o Acquire::Retries=3 -y install git
233-
python_version=$(python3 -c 'import sys; print("{0.major}.{0.minor}".format(sys.version_info))')
234-
if [[ ${python_version} =~ ^3\.[0-5]$ ]]; then
235-
true
236-
else
237-
apt-get install -y python3-distutils
238-
fi
239-
sudo wget https://bootstrap.pypa.io/pip/$python_version/get-pip.py
240-
sudo python3 get-pip.py
241-
sudo /usr/local/bin/pip install cmake
227+
apt-get -o Acquire::Retries=3 update && DEBIAN_FRONTEND=noninteractive apt-get -y install tzdata && apt-get -o Acquire::Retries=3 install -y sudo software-properties-common wget curl apt-transport-https make apt-file sudo unzip libssl-dev build-essential autotools-dev autoconf automake g++ libc++-helpers python ruby cpio gcc-multilib g++-multilib pkgconf python3 ccache libpython-dev locales
228+
sudo apt-add-repository ppa:git-core/ppa
229+
sudo apt-get -o Acquire::Retries=3 update && apt-get -o Acquire::Retries=3 -y install git
230+
python_version=$(python3 -c 'import sys; print("{0.major}.{0.minor}".format(sys.version_info))')
231+
if [[ ${python_version} =~ ^3\.[0-5]$ ]]; then
232+
true
233+
else
234+
apt-get install -y python3-distutils
235+
fi
236+
sudo wget https://bootstrap.pypa.io/pip/$python_version/get-pip.py
237+
sudo python3 get-pip.py
238+
sudo /usr/local/bin/pip install cmake
239+
240+
if [[ "${{matrix.container}}" == "ubuntu:16.04" ]] || [[ "${{matrix.container}}" == "ubuntu:18.04" ]]; then
241+
echo "ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION=true" >> $GITHUB_ENV
242+
fi
243+
242244
- uses: actions/checkout@v3
243245

244246
- name: Install packages

0 commit comments

Comments
 (0)