Skip to content

Commit

Permalink
Update docker.yml (#23)
Browse files Browse the repository at this point in the history
* Update docker.yml

Add support for bionic

* Update for bionic

* Updates

* Add git to install build tools

* Updates after shell script linter

* Undo script changes from linter since they broke script

* Address script linter warnings

* Update to .sh extension inline with google style guide
  • Loading branch information
paulbourelly999 authored Nov 3, 2023
1 parent 9d81166 commit ecbadec
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ jobs:
strategy:
matrix:
include:
- architecture: x64
ubuntu-codename: bionic
target: x64-version
- architecture: x64
ubuntu-codename: focal
target: x64-version
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ RUN apt-get update
FROM base AS x64-version

# add build tools including Google test and mock
RUN apt-get install -y cmake build-essential file libgtest-dev libgmock-dev gdb git
COPY scripts/install_build_tools.sh /install_build_tools.sh
RUN ./install_build_tools.sh


FROM base AS cross-compile-version

Expand Down
27 changes: 27 additions & 0 deletions scripts/install_build_tools.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash
set -e
# shellcheck source=/dev/null
. /etc/lsb-release
echo "Distribution code name : ${DISTRIB_CODENAME}"
apt-get update
if [ "$DISTRIB_CODENAME" = "bionic" ];then
echo "Installing bionic build tools ..."
DEPENDENCIES=(
build-essential
cmake
googletest
google-mock
gdb
git)
else
echo "Installing other linux distribution (focal or jammy) build tools ..."
DEPENDENCIES=(
build-essential
cmake
build-essential
libgtest-dev
libgmock-dev
gdb
git)
fi
DEBIAN_FRONTEND=noninteractive apt install --no-install-recommends --yes --quiet "${DEPENDENCIES[@]}"

0 comments on commit ecbadec

Please sign in to comment.