Skip to content

Commit

Permalink
update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
WeiqunZhang committed Sep 20, 2024
1 parent d4fff9e commit 7e3c33b
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 7 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/cuda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: cuda

on: [push, pull_request]

concurrency:
group: ${{ github.ref }}-${{ github.head_ref }}-cuda
cancel-in-progress: true

jobs:
Tests:
name: CUDA Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies_nvcc.sh
- name: Tests
run: |
cd Tests/GPU
make -j4 USE_CUDA=TRUE
./main.gnu.ex
6 changes: 1 addition & 5 deletions .github/workflows/dependencies/dependencies_gcc.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
#!/usr/bin/env bash
#
# Copyright 2020 The AMReX Community
#
# License: BSD-3-Clause-LBNL
# Authors: Axel Huebl

set -eu -o pipefail

Expand All @@ -17,4 +12,5 @@ sudo apt-get update

sudo apt-get install -y --no-install-recommends \
build-essential \
cmake \
g++
25 changes: 25 additions & 0 deletions .github/workflows/dependencies/dependencies_nvcc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash

set -eu -o pipefail

# `man apt.conf`:
# Number of retries to perform. If this is non-zero APT will retry
# failed files the given number of times.
echo 'Acquire::Retries "3";' | sudo tee /etc/apt/apt.conf.d/80-retries

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get -qqq update
sudo apt-get install -y \
build-essential \
wget \
cmake \
g++

source /etc/os-release # set UBUNTU_CODENAME
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu${VERSION_ID}/x86_64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt-get update
sudo apt-get install -y \
cuda-command-line-tools \
cuda-compiler \
cuda-minimal-build
4 changes: 2 additions & 2 deletions .github/workflows/gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ concurrency:
cancel-in-progress: true

jobs:
gcc_gmake:
name: GCC & GNU Make
Tests:
name: GCC Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down

0 comments on commit 7e3c33b

Please sign in to comment.