Skip to content

Commit

Permalink
Merge 701b24c into 50b0372
Browse files Browse the repository at this point in the history
  • Loading branch information
srz-zumix committed Apr 12, 2020
2 parents 50b0372 + 701b24c commit 7eb8a62
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 20 deletions.
25 changes: 25 additions & 0 deletions .ci/linux/install-clang.sh
@@ -0,0 +1,25 @@
#!/bin/sh

set -e

if [ -z ${CLANG_VERSION+x} ]; then
echo "CLANG_VERSION is empty. skip install clang..."
return
fi

. /etc/os-release
wget -qO - http://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository -y "deb http://apt.llvm.org/${VERSION_CODENAME}/ llvm-toolchain-${VERSION_CODENAME}-${CLANG_VERSION} main"
sudo apt-get -y --allow-unauthenticated update
sudo apt-get -qq install "clang-${CLANG_VERSION}"


if $INSATLL_CLANG_TOOLS; then
sudo apt-get -y --force-yes -qq install "clang-tools-${CLANG_VERSION}"
CLANG_SLAVES="--slave /usr/bin/scan-build scan-build /usr/bin/scan-build-${CLANG_VERSION}"
fi

sudo update-alternatives --install /usr/bin/clang clang \
/usr/bin/clang-${CLANG_VERSION} 360 \
--slave /usr/bin/clang++ clang++ /usr/bin/clang++-${CLANG_VERSION} \
${CLANG_SLAVES}
23 changes: 23 additions & 0 deletions .ci/linux/install-gcc.sh
@@ -0,0 +1,23 @@
#!/bin/sh

set -e

if [ -z ${GCC_VERSION+x} ]; then
echo "GCC_VERSION is empty. skip install gcc..."
return
fi

. /etc/os-release
MAJOR_VERSION=$(echo ${VERSION_ID} | cut -d '.' -f1)

if [ "${MAJOR_VERSION}" -lt 19 ]; then
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
else
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/ppa
fi

sudo apt-get -y --allow-unauthenticated update
sudo apt-get -qq install "g++-${GCC_VERSION}"
sudo update-alternatives --install /usr/bin/gcc gcc \
/usr/bin/gcc-${GCC_VERSION} 90 \
--slave /usr/bin/g++ g++ /usr/bin/g++-${GCC_VERSION}
12 changes: 4 additions & 8 deletions .circleci/config.yml
Expand Up @@ -34,14 +34,8 @@ aliases:
command: |
sudo apt-get -y --allow-unauthenticated update
sudo apt-get install software-properties-common
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
wget -qO - http://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository -y 'deb http://apt.llvm.org/disco/ llvm-toolchain-disco-9 main'
sudo apt-get -y --allow-unauthenticated update
sudo apt-get -qq install clang-9
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-9 60 --slave /usr/bin/clang++ clang++ /usr/bin/clang++-9
sudo apt-get -qq install g++-8
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 90 --slave /usr/bin/g++ g++ /usr/bin/g++-8
./.ci/linux/install-clang.sh
./.ci/linux/install-gcc.sh
- &save_cache
key: v2-dep-{{ .Branch }}-{{ epoch }}
paths:
Expand Down Expand Up @@ -117,6 +111,7 @@ jobs:
<<: *default
environment:
CXX: g++
GCC_VERSION: "8"
FAST_OPTIMIZE: -Og
# FAST_OPTIMIZE: -Ofast # https://github.com/srz-zumix/iutest/issues/396
steps: *build-test-steps
Expand All @@ -125,6 +120,7 @@ jobs:
<<: *default
environment:
CXX: clang++
CLANG_VERSION: "9"
FAST_OPTIMIZE: -Ot
MAKE_ADD_OPTION: CXXFLAGS=-ftime-trace
steps: *build-test-steps
Expand Down
18 changes: 6 additions & 12 deletions .semaphore/semaphore.yml
Expand Up @@ -13,8 +13,10 @@ global_job_config:
value: -j8
- name: CLANG_VERSION
value: "9"
- name: UBNAME
value: bionic
- name: INSATLL_CLANG_TOOLS
value: "true"
- name: GCC_VERSION
value: "7"
prologue:
commands:
# - checkout --use-cache
Expand All @@ -38,16 +40,8 @@ blocks:
prologue:
commands:
# - cache restore
- wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
- sudo apt-key update && sudo apt-get -qq update
- sudo add-apt-repository -y "deb http://apt.llvm.org/$UBNAME/ llvm-toolchain-$UBNAME-$CLANG_VERSION main"
- sudo add-apt-repository -y "deb http://apt.llvm.org/$UBNAME/ llvm-toolchain-$UBNAME main"
- sudo apt-key update && sudo apt-get -qq update
- sudo apt-cache search clang
- sudo apt-get -y --force-yes -qq install clang-$CLANG_VERSION clang-tools-$CLANG_VERSION
- sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-$CLANG_VERSION 360 --slave /usr/bin/clang++ clang++ /usr/bin/clang++-$CLANG_VERSION --slave /usr/bin/scan-build scan-build /usr/bin/scan-build-$CLANG_VERSION
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get update && sudo apt-get -qq install g++-7
- ./.ci/linux/install-clang.sh
- ./.ci/linux/install-gcc.sh
jobs:
- name: minimum_tests
commands:
Expand Down

0 comments on commit 7eb8a62

Please sign in to comment.