add ugate test, remove ppa:tool-chain/test #116
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Ubuntu CI | |
on: | |
push: | |
paths-ignore: | |
- ".devcontainer/**" | |
- ".vscode/**" | |
- "doc/**" | |
- "*.md" | |
pull_request: | |
paths-ignore: | |
- ".devcontainer/**" | |
- ".vscode/**" | |
- "doc/**" | |
- "*.md" | |
jobs: | |
gcc10-build: | |
name: GCC10 build | |
strategy: | |
matrix: | |
python-version: ["3.10"] | |
runs-on: "ubuntu-20.04" | |
env: | |
CXX_COMPILER: "/usr/lib/ccache/g++" | |
C_COMPILER: "/usr/lib/ccache/gcc" | |
QULACS_OPT_FLAGS: "-mtune=haswell -march=haswell -mfpmath=both" | |
COVERAGE: "Yes" | |
USE_TEST: "Yes" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install gcc-10/g++-10 | |
uses: sudo apt-get update && \ | |
apt-get install -y software-properties-common && \ | |
add-apt-repository ppa:ubuntu-toolchain-r/test && \ | |
apt-get update && \ | |
apt-get install -y gcc-10 g++-10 && \ | |
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 && \ | |
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 100 \ | |
- name: Setup cmake | |
uses: lukka/get-cmake@latest | |
- name: Install Ninja | |
run: sudo apt install ninja-build | |
- name: Setup ccache | |
uses: hendrikmuhs/[email protected] | |
with: | |
key: "${{ github.job }}-ubuntu-20.04" | |
verbose: 2 | |
- name: Install qulacs for Ubuntu | |
run: ./script/build_gcc.sh | |
- name: Test in Ubuntu | |
run: | | |
ninja test -C build -j $(nproc) |