Format only after tests are success #15
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
# This is a basic workflow to help you get started with Actions | |
name: Short-Tests | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the mydev branch | |
push: | |
pull_request: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
build-TITANV: | |
runs-on: ubuntu-latest | |
container: | |
image: tgrogers/accel-sim_regress:Ubuntu-22.04-cuda-11.7 | |
env: | |
CONFIG: TITANV | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
- name: Run Simulation | |
run: /bin/bash $GITHUB_WORKSPACE/short-tests.sh | |
build-TITANV-LOCALXBAR: | |
runs-on: ubuntu-latest | |
container: | |
image: tgrogers/accel-sim_regress:Ubuntu-22.04-cuda-11.7 | |
env: | |
CONFIG: TITANV-LOCALXBAR | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
- name: Run Simulation | |
run: /bin/bash $GITHUB_WORKSPACE/short-tests.sh | |
build-QV100: | |
runs-on: ubuntu-latest | |
container: | |
image: tgrogers/accel-sim_regress:Ubuntu-22.04-cuda-11.7 | |
env: | |
CONFIG: QV100 | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
- name: Run Simulation | |
run: /bin/bash $GITHUB_WORKSPACE/short-tests.sh | |
build-2060: | |
runs-on: ubuntu-latest | |
container: | |
image: tgrogers/accel-sim_regress:Ubuntu-22.04-cuda-11.7 | |
env: | |
CONFIG: RTX2060 | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
- name: Run Simulation | |
run: /bin/bash $GITHUB_WORKSPACE/short-tests.sh | |
build-3070: | |
runs-on: ubuntu-latest | |
container: | |
image: tgrogers/accel-sim_regress:Ubuntu-22.04-cuda-11.7 | |
env: | |
CONFIG: RTX3070 | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
- name: Run Simulation | |
run: /bin/bash $GITHUB_WORKSPACE/short-tests.sh | |
format-code: | |
runs-on: ubuntu-latest | |
needs: [build-TITANV, build-TITANV-LOCALXBAR, build-QV100, build-2060, build-3070] | |
permissions: | |
# Give the default GITHUB_TOKEN write permission to commit and push the | |
# added or changed files to the repository. | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
# Other steps that change files in the repository go here | |
# … | |
- name: Run clang-format | |
run: | | |
sudo apt-get install -y clang-format | |
/bin/bash ./format-code.sh | |
- uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
# Optional. Commit message for the created commit. | |
# Defaults to "Apply automatic changes" | |
commit_message: Automated clang-format | |
# Optional. Option used by `git-status` to determine if the repository is | |
# dirty. See https://git-scm.com/docs/git-status#_options | |
status_options: '--untracked-files=no' |