Skip to content

Commit

Permalink
Disable all and test only the one
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudhan committed Sep 3, 2023
1 parent 4c50b27 commit 32a352c
Show file tree
Hide file tree
Showing 6 changed files with 313 additions and 311 deletions.
77 changes: 39 additions & 38 deletions .github/workflows/build-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,51 +15,52 @@ jobs:
matrix:
cases:
- { os: "ubuntu-20.04", cuda-version: "11.2.2", source: "nvidia" }
- { os: "ubuntu-20.04", cuda-version: "11.6.2", source: "nvidia" }
- {
os: "ubuntu-20.04",
cuda-version: "11.6.2",
source: "nvidia",
toolchain: "llvm",
toolchain-version: "16",
}
- {
os: "ubuntu-22.04",
cuda-version: "11.5.1-1ubuntu1",
source: "ubuntu",
}
- { os: "windows-2019", cuda-version: "10.1.243", source: "nvidia" }
- { os: "windows-2019", cuda-version: "11.6.2", source: "nvidia" }
# - { os: "ubuntu-20.04", cuda-version: "11.6.2", source: "nvidia" }
# - {
# os: "ubuntu-20.04",
# cuda-version: "11.6.2",
# source: "nvidia",
# toolchain: "llvm",
# toolchain-version: "16",
# }
# - {
# os: "ubuntu-22.04",
# cuda-version: "11.5.1-1ubuntu1",
# source: "ubuntu",
# }
# - { os: "windows-2019", cuda-version: "10.1.243", source: "nvidia" }
# - { os: "windows-2019", cuda-version: "11.6.2", source: "nvidia" }
steps:
- uses: actions/checkout@v3

- uses: bazelbuild/setup-bazelisk@v2
- name: Mount bazel cache
if: ${{ !startsWith(matrix.cases.os, 'windows') }}
uses: actions/cache@v3
with:
path: ~/.cache/bazel
key: bazel-${{ matrix.cases.os }}-cuda-${{ matrix.cases.cuda-version }}-${{ hashFiles('.bazelversion') }}

- uses: ./.github/actions/set-build-env
with:
case: ${{ matrix.cases }}

- name: Bazel build config for LLVM
if: ${{ !startsWith(matrix.cases.os, 'windows') && matrix.cases.toolchain == 'llvm' }}
run: |
echo "build --config=clang" > $HOME/.bazelrc
echo "build:clang --@rules_cuda//cuda:archs=sm_80" >> $HOME/.bazelrc
echo "build:clang --spawn_strategy=local" >> $HOME/.bazelrc
# - uses: bazelbuild/setup-bazelisk@v2
# - name: Mount bazel cache
# if: ${{ !startsWith(matrix.cases.os, 'windows') }}
# uses: actions/cache@v3
# with:
# path: ~/.cache/bazel
# key: bazel-${{ matrix.cases.os }}-cuda-${{ matrix.cases.cuda-version }}-${{ hashFiles('.bazelversion') }}


# - name: Bazel build config for LLVM
# if: ${{ !startsWith(matrix.cases.os, 'windows') && matrix.cases.toolchain == 'llvm' }}
# run: |
# echo "build --config=clang" > $HOME/.bazelrc
# echo "build:clang --@rules_cuda//cuda:archs=sm_80" >> $HOME/.bazelrc
# echo "build:clang --spawn_strategy=local" >> $HOME/.bazelrc

- run: bazelisk build @rules_cuda_examples//basic:all
- run: bazelisk build @rules_cuda_examples//rdc:all
- run: bazelisk build @rules_cuda_examples//if_cuda:main
- run: bazelisk build @rules_cuda_examples//if_cuda:main --enable_cuda=False
# - run: bazelisk build @rules_cuda_examples//basic:all
# - run: bazelisk build @rules_cuda_examples//rdc:all
# - run: bazelisk build @rules_cuda_examples//if_cuda:main
# - run: bazelisk build @rules_cuda_examples//if_cuda:main --enable_cuda=False

- run: cd examples && bazelisk build //basic:all --config=bzlmod
- run: cd examples && bazelisk build //rdc:all --config=bzlmod
- run: cd examples && bazelisk build //if_cuda:main --config=bzlmod
- run: cd examples && bazelisk build //if_cuda:main --enable_cuda=False --config=bzlmod
# - run: cd examples && bazelisk build //basic:all --config=bzlmod
# - run: cd examples && bazelisk build //rdc:all --config=bzlmod
# - run: cd examples && bazelisk build //if_cuda:main --config=bzlmod
# - run: cd examples && bazelisk build //if_cuda:main --enable_cuda=False --config=bzlmod

- run: bazelisk shutdown
# - run: bazelisk shutdown
136 changes: 68 additions & 68 deletions .github/workflows/github-pages.yaml
Original file line number Diff line number Diff line change
@@ -1,79 +1,79 @@
name: Generate docs
# name: Generate docs

on:
pull_request:
branches:
- main
push:
branches:
- main
# on:
# pull_request:
# branches:
# - main
# push:
# branches:
# - main

jobs:
pages:
runs-on: ubuntu-latest
strategy:
matrix:
docs:
# { ref: <branch/tag name>, name: <docs drop down entry> }
- { ref: main, name: latest }
steps:
- uses: actions/checkout@v3
if: ${{ matrix.docs.ref == 'main' }}
- uses: actions/checkout@v3
with:
ref: ${{ matrix.docs.ref }}
if: ${{ matrix.docs.ref != 'main' }}
# jobs:
# pages:
# runs-on: ubuntu-latest
# strategy:
# matrix:
# docs:
# # { ref: <branch/tag name>, name: <docs drop down entry> }
# - { ref: main, name: latest }
# steps:
# - uses: actions/checkout@v3
# if: ${{ matrix.docs.ref == 'main' }}
# - uses: actions/checkout@v3
# with:
# ref: ${{ matrix.docs.ref }}
# if: ${{ matrix.docs.ref != 'main' }}

- uses: bazelbuild/setup-bazelisk@v2
- name: Mount bazel cache
uses: actions/cache@v3
with:
path: ~/.cache/bazel
key: bazel-gen-docs-${{ matrix.docs.ref }}
# - uses: bazelbuild/setup-bazelisk@v2
# - name: Mount bazel cache
# uses: actions/cache@v3
# with:
# path: ~/.cache/bazel
# key: bazel-gen-docs-${{ matrix.docs.ref }}

- uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: pip
# - uses: actions/setup-python@v4
# with:
# python-version: "3.10"
# cache: pip

- name: Generate docs
run: bash ./build-docs.sh
env:
CI: 1
working-directory: ${{ github.workspace }}/docs
# - name: Generate docs
# run: bash ./build-docs.sh
# env:
# CI: 1
# working-directory: ${{ github.workspace }}/docs

- run: bazelisk shutdown
# - run: bazelisk shutdown

- uses: actions/upload-artifact@v3
with:
name: "${{ matrix.docs.name }}"
path: ${{ github.workspace }}/docs/site/
if-no-files-found: error
if: ${{ github.event_name != 'pull_request' }}
# - uses: actions/upload-artifact@v3
# with:
# name: "${{ matrix.docs.name }}"
# path: ${{ github.workspace }}/docs/site/
# if-no-files-found: error
# if: ${{ github.event_name != 'pull_request' }}

publish:
needs: pages
if: ${{ github.event_name != 'pull_request' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# publish:
# needs: pages
# if: ${{ github.event_name != 'pull_request' }}
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3

- uses: actions/download-artifact@v3
with:
path: ${{ github.workspace }}/docs/generated
- name: Inspect docs site directory structure
run: find ${{ github.workspace }}/docs/generated -maxdepth 2
# - uses: actions/download-artifact@v3
# with:
# path: ${{ github.workspace }}/docs/generated
# - name: Inspect docs site directory structure
# run: find ${{ github.workspace }}/docs/generated -maxdepth 2

- uses: actions/setup-python@v4
with:
python-version: "3.10"
- run: |
pip install packaging==23.*
python versioning.py generated/
working-directory: ${{ github.workspace }}/docs
# - uses: actions/setup-python@v4
# with:
# python-version: "3.10"
# - run: |
# pip install packaging==23.*
# python versioning.py generated/
# working-directory: ${{ github.workspace }}/docs

- uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/generated
force_orphan: true
# - uses: peaceiris/actions-gh-pages@v3
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: ./docs/generated
# force_orphan: true
Loading

0 comments on commit 32a352c

Please sign in to comment.