Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update install script #411

Merged
merged 11 commits into from Apr 13, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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_VERSOIN is empty. skip install clang..."
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Misspell] "VERSOIN" is a misspelling of "VERSION" (view)

Rule
"VERSOIN" is a misspelling of "VERSION"

You can mark this issue as closed if you should not tackle it. (see our document about issues)

return
fi

. /etc/os-release
wget -qO - http://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
add-apt-repository -y 'deb http://apt.llvm.org/${VERSION_CODENAME}/ llvm-toolchain-${VERSION_CODENAME}-${CLANG_VERSION} main'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shellcheck] reported by reviewdog 🐶
Expressions don't expand in single quotes, use double quotes for that. SC2016

apt-get -y --allow-unauthenticated update
apt-get -qq install clang-${CLANG_VERSION}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086



if $INSATLL_CLANG_TOOLS; then
apt-get -y --force-yes -qq install clang-$CLANG_VERSION clang-tools-$CLANG_VERSION

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

CLANG_SLAVES="--slave /usr/bin/scan-build scan-build /usr/bin/scan-build-$CLANG_VERSION"
fi

update-alternatives --install /usr/bin/clang clang \
/usr/bin/clang-${CLANG_VERSION} 360 \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

--slave /usr/bin/clang++ clang++ /usr/bin/clang++-${CLANG_VERSION} \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

${CLANG_SLAVES}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

15 changes: 15 additions & 0 deletions .ci/linux/install-gcc.sh
@@ -0,0 +1,15 @@
#!/bin/sh

set -e

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

add-apt-repository -y ppa:ubuntu-toolchain-r/test
apt-get -y --allow-unauthenticated update
apt-get -qq install g++-${GCC_VERSION}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

update-alternatives --install /usr/bin/gcc gcc \
/usr/bin/gcc-${GCC_VERSION} 90 \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

--slave /usr/bin/g++ g++ /usr/bin/g++-${GCC_VERSION}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shellcheck] reported by reviewdog 🐶
Double quote to prevent globbing and word splitting. SC2086

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
sudo ./.ci/linux/install-clnag.sh
sudo ./.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
- sudo ./.ci/linux/install-clang.sh
- sudo ./.ci/linux/install-gcc.sh
jobs:
- name: minimum_tests
commands:
Expand Down