meson: add more SM versions #22
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: CI | |
on: [push, pull_request] | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
linux: | |
name: Linux | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
build: [ubuntu-latest, ubuntu-rolling, fedora-latest, cuda-12.1] | |
compiler: [gcc, clang] | |
include: | |
- build: ubuntu-latest | |
docker_image: ubuntu | |
docker_tag: latest | |
- build: ubuntu-rolling | |
docker_image: ubuntu | |
docker_tag: rolling | |
- build: fedora-latest | |
docker_image: fedora | |
docker_tag: latest | |
- build: cuda-12.1 | |
docker_image: nvidia/cuda | |
docker_tag: 12.1.1-devel-ubuntu22.04 | |
steps: | |
- uses: actions/checkout@master | |
- name: Prepare environment | |
run: | | |
echo -n "container_name=" >> "$GITHUB_ENV" | |
echo "nbody-docker-builder-${{ matrix.compiler }}-${{ matrix.docker_image }}-${{ matrix.docker_tag }}" | sed -r 's/[^A-Za-z0-9-]/-/g' >> "$GITHUB_ENV" | |
- name: Install Docker (if not present) | |
run: | | |
apt-get -q -o=Dpkg::Use-Pty=0 update && apt-get -q -o=Dpkg::Use-Pty=0 -y dist-upgrade && apt-get -q -o=Dpkg::Use-Pty=0 -y install docker.io || true | |
- name: Destroy old container | |
run: | | |
docker rm -f ${{ env.container_name }} | |
- name: Launch container | |
run: | | |
docker run -d --rm --name ${{ env.container_name }} -e LC_ALL="C" -e LANG="C" ${{ matrix.docker_image }}:${{ matrix.docker_tag }} tail -f /dev/null | |
docker ps | |
- name: Copy source tree | |
run: | | |
docker cp ${{ github.workspace }} ${{ env.container_name }}:/build | |
- name: Install dependencies | |
run: | | |
docker exec -w /build -e COMPILER=${{ matrix.compiler }} -e IMAGE=${{ matrix.docker_image }} -e IMAGE_TAG=${{ matrix.docker_tag }} -t ${{ env.container_name }} bash .github/install.sh | |
docker exec -w /build -e COMPILER=${{ matrix.compiler }} -e IMAGE=${{ matrix.docker_image }} -e IMAGE_TAG=${{ matrix.docker_tag }} -t ${{ env.container_name }} bash .github/install-post.sh | |
- name: Build and run project | |
run: | | |
docker exec -w /build -e COMPILER=${{ matrix.compiler }} -e IMAGE=${{ matrix.docker_image }} -e IMAGE_TAG=${{ matrix.docker_tag }} -t ${{ env.container_name }} bash .github/script.sh | |
- name: Destroy container | |
run: | | |
docker rm -f ${{ env.container_name }} |