Add dedicated image for CircleCI builds
This essentially just bakes in all the dependencies and other third party tools that we need, preventing them from being downloaded on every new CI run. TravisCI does not have non-enterprise support for custom images without a lot of hassle.
This commit is contained in:
committed by
username223
parent
11c0231a6a
commit
44a5d3eed0
+4
-57
@@ -13,65 +13,9 @@ jobs:
|
||||
QT_SELECT: opt-qt512
|
||||
MAKE_JOBS: 2
|
||||
docker:
|
||||
- image: circleci/buildpack-deps:xenial
|
||||
- image: username223/ovras-appimage-build
|
||||
steps:
|
||||
- checkout
|
||||
- run: sudo apt-get update && sudo apt-get upgrade -y
|
||||
- run:
|
||||
name: Get apt-key
|
||||
# Required for LLVM
|
||||
command: |
|
||||
sudo apt-get install software-properties-common apt-transport-https -y
|
||||
- run:
|
||||
name: Get LLVM repos
|
||||
command: |
|
||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
||||
sudo add-apt-repository 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main'
|
||||
sudo add-apt-repository 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main'
|
||||
sudo apt-get update -qq
|
||||
- run:
|
||||
name: Install LLVM-8 binaries
|
||||
# clang is required due to a check by Qmake.
|
||||
# clang-tidy-8 has new errors compared to clang-tidy-7, so we haven't upgraded.
|
||||
command: |
|
||||
sudo apt-get install clang-format-8 -y
|
||||
sudo apt-get install clang-tidy-7 -y
|
||||
sudo apt-get install clang-8 -y
|
||||
sudo apt-get install clang -y
|
||||
- run:
|
||||
name: Run clang-format
|
||||
command: python ./build_scripts/run-clang-format.py ./src -r --color always --clang-format-executable clang-format-8
|
||||
- run:
|
||||
name: Install g++
|
||||
command: |
|
||||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
|
||||
sudo apt-get update
|
||||
sudo apt-get install g++-7 -y
|
||||
- run:
|
||||
name: Add required QT repos
|
||||
command: |
|
||||
sudo add-apt-repository ppa:beineri/opt-qt-5.12.2-xenial -y
|
||||
sudo apt-get update -qq
|
||||
- run: sudo apt-get install build-essential libgl1-mesa-dev -y
|
||||
- run:
|
||||
name: Install QT packages
|
||||
command: |
|
||||
sudo apt-get install qt512-meta-minimal qt512multimedia qt512declarative qt512quickcontrols2 qt512quickcontrols qt512tools qt512imageformats qt512svg qt512base qtchooser -y
|
||||
- run:
|
||||
name: Install X11 packages
|
||||
command: sudo apt-get install libx11-dev libxt-dev libxtst-dev -y
|
||||
- run:
|
||||
name: Install pulse packages
|
||||
command: sudo apt-get install libpulse-dev -y
|
||||
- run:
|
||||
name: Install bear/clang-tidy
|
||||
command: sudo apt-get install bear clang-tidy -y
|
||||
- run:
|
||||
name: Install SDL libs
|
||||
command: sudo apt-get install libsdl2-2.0-0 -y
|
||||
- run:
|
||||
name: Set up qtchooser
|
||||
command: qtchooser -install opt-qt512 /opt/qt512/bin/qmake
|
||||
- run:
|
||||
name: Give build scripts +x
|
||||
command: |
|
||||
@@ -79,6 +23,9 @@ jobs:
|
||||
chmod +x ./build_scripts/linux/format.sh
|
||||
chmod +x ./build_scripts/linux/run-clang-tidy.sh
|
||||
chmod +x ./build_scripts/linux/verify_formatting.sh
|
||||
- run:
|
||||
name: Run clang-format
|
||||
command: python ./build_scripts/run-clang-format.py ./src -r --color always --clang-format-executable clang-format-8
|
||||
- run:
|
||||
name: Update version number
|
||||
command: |
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
FROM circleci/buildpack-deps:xenial
|
||||
|
||||
# Make sure all packages are up to date for the install
|
||||
RUN sudo apt-get update && sudo apt-get upgrade
|
||||
|
||||
# Required for LLVM
|
||||
RUN sudo apt-get install software-properties-common apt-transport-https -y
|
||||
|
||||
# Install LLVM7 and LLVM8
|
||||
RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
||||
RUN sudo add-apt-repository 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main'
|
||||
RUN sudo add-apt-repository 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main'
|
||||
RUN sudo apt-get update -qq
|
||||
|
||||
# Install LLVM8 binaries
|
||||
# clang is reuired due to a check by qmake
|
||||
# clang-tidy-8 has new errors compared to clang-tidy-7, so we haven't upgraded.
|
||||
RUN sudo apt-get install clang-format-8 -y
|
||||
RUN sudo apt-get install clang-tidy-7 -y
|
||||
RUN sudo apt-get install clang-8 -y
|
||||
RUN sudo apt-get install clang -y
|
||||
|
||||
# Install g++
|
||||
RUN sudo add-apt-repository ppa:ubuntu-toolchain-r/test
|
||||
RUN sudo apt-get update
|
||||
RUN sudo apt-get install g++-7 -y
|
||||
|
||||
# Add Qt 5.12 repos
|
||||
RUN sudo add-apt-repository ppa:beineri/opt-qt-5.12.2-xenial -y
|
||||
RUN sudo apt-get update -qq
|
||||
|
||||
# Get build-essential and libgl1-mesa-dev
|
||||
RUN sudo apt-get install build-essential libgl1-mesa-dev -y
|
||||
|
||||
# Install Qt packages
|
||||
RUN sudo apt-get install qt512-meta-minimal qt512multimedia qt512declarative qt512quickcontrols2 qt512quickcontrols qt512tools qt512imageformats qt512svg qt512base qtchooser -y
|
||||
|
||||
# Install X11 packages
|
||||
RUN sudo apt-get install libx11-dev libxt-dev libxtst-dev -y
|
||||
|
||||
# Install PulseAudio packages
|
||||
RUN sudo apt-get install libpulse-dev -y
|
||||
|
||||
# Install bear/clang-tidy
|
||||
RUN sudo apt-get install bear clang-tidy -y
|
||||
|
||||
# Install SDL libs
|
||||
RUN sudo apt-get install libsdl2-2.0-0 -y
|
||||
|
||||
# Set up qtchooser
|
||||
RUN qtchooser -install opt-qt512 /opt/qt512/bin/qmake
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# CI Build Images for OVRAS
|
||||
|
||||
Docker images for use on CI.
|
||||
|
||||
Can be built with `sudo docker build -t [tagname] . -f DockerfileName`.
|
||||
|
||||
Must be uploaded to DockerHub through `sudo docker push [tagname]` and then used in the CI file via the `image: ` command.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user