29 add swap #217
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: | |
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: CMAKE_BUILD_TYPE=Debug ./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 | |
# GitHub Actions cannot run CUDA program |