-
Notifications
You must be signed in to change notification settings - Fork 0
112 lines (95 loc) · 2.8 KB
/
ci_ubuntu.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: Ubuntu CI
on:
push:
paths-ignore:
- ".devcontainer/**"
- ".vscode/**"
- "doc/**"
- "*.md"
pull_request:
paths-ignore:
- ".devcontainer/**"
- ".vscode/**"
- "doc/**"
- "*.md"
jobs:
gcc11-build:
name: GCC11 build
strategy:
matrix:
python-version: ["3.10"]
runs-on: "ubuntu-22.04"
env:
CXX_COMPILER: "/usr/lib/ccache/g++"
C_COMPILER: "/usr/lib/ccache/gcc"
QULACS_USE_TEST: "Yes"
steps:
- uses: actions/checkout@v3
- name: Install gcc-11/g++-11
run: |
sudo apt update && \
sudo apt install -y software-properties-common && \
sudo apt update && \
sudo apt install -y gcc-11 g++-11 && \
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100 && \
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 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-22.04"
verbose: 2
- name: Install qulacs for Ubuntu
run: ./script/build_gcc.sh
- name: Test in Ubuntu
run: |
ninja test -C build -j $(nproc)
nvcc-build:
name: NVCC build
strategy:
matrix:
python-version: ["3.10"]
runs-on: "ubuntu-22.04"
env:
CXX_COMPILER: "/usr/lib/ccache/g++"
C_COMPILER: "/usr/lib/ccache/gcc"
QULACS_USE_TEST: "Yes"
QULACS_USE_CUDA: "Yes"
steps:
- uses: actions/checkout@v3
- name: Install gcc-11/g++-11
run: |
sudo apt update && \
sudo apt install -y software-properties-common && \
sudo apt update && \
sudo apt install -y gcc-11 g++-11 && \
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100 && \
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 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-22.04"
verbose: 2
- name: Install CUDA toolkit
uses: Jimver/[email protected]
with:
cuda: "12.2.0"
method: "network"
- name: Show installed Compiler version
run: |
nvcc --version
gcc --version
g++ --version
cmake --version
- name: Install qulacs for Ubuntu
run: ./script/build_gcc.sh
- name: Test in Ubuntu
run: |
ninja test -C build -j $(nproc)