Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc only change #17

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 21 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,8 @@ name: CI
on:
push:
branches: [master]
paths-ignore:
- "docs/**"
- "LICENSES/**"
- "LICENSE"
- "CONTRIBUTING.md"
- "README.md"
pull_request:
branches: [master]
paths-ignore:
- "docs/**"
- "LICENSES/**"
- "LICENSE"
- "CONTRIBUTING.md"
- "README.md"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand Down Expand Up @@ -91,7 +79,24 @@ jobs:
with:
submodules: "recursive"
fetch-depth: "0"
- id: filter
run: |
# This step prevents subsequent steps from running if only documentation was changed
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
git fetch origin ${{ github.base_ref }}
BASE=origin/${{ github.base_ref }}
else
BASE=HEAD^1
fi
if git diff --name-only -z $BASE...HEAD |
grep --null-data -qvE '^(docs/|LICENSES/|LICENSE$|CONTRIBUTING\.md$|README\.md$)'; then
echo "should-run=true" >> $GITHUB_OUTPUT
else
echo "Only documentation files changed, skipping remaining steps"
echo "should-run=false" >> $GITHUB_OUTPUT
fi
- name: Setup
if: steps.filter.outputs.should-run == 'true'
uses: ./.github/actions/common-setup
with:
os: ${{matrix.os}}
Expand All @@ -100,6 +105,7 @@ jobs:
config: ${{matrix.config}}
build-llvm: ${{ matrix.platform != 'wasm' }}
- name: Build Slang
if: steps.filter.outputs.should-run == 'true'
run: |
if [[ "${{ matrix.platform }}" = "wasm" ]]; then
git clone https://github.com/emscripten-core/emsdk.git
Expand Down Expand Up @@ -138,7 +144,7 @@ jobs:
fi
fi
- name: Test Slang
if: ${{ matrix.platform != 'wasm' }}
if: steps.filter.outputs.should-run == 'true' && matrix.platform != 'wasm'
run: |
export SLANG_RUN_SPIRV_VALIDATION=1
export SLANG_USE_SPV_SOURCE_LANGUAGE_UNKNOWN=1
Expand All @@ -164,7 +170,7 @@ jobs:
-expected-failure-list tests/expected-failure-record-replay-tests.txt
fi
- name: Test Slang via glsl
if: ${{ matrix.full-gpu-tests && matrix.platform != 'wasm' }}
if: steps.filter.outputs.should-run == 'true' && matrix.full-gpu-tests && matrix.platform != 'wasm'
run: |
export SLANG_RUN_SPIRV_VALIDATION=1
export SLANG_USE_SPV_SOURCE_LANGUAGE_UNKNOWN=1
Expand All @@ -176,7 +182,7 @@ jobs:
-api vk \
-expected-failure-list tests/expected-failure.txt
- uses: actions/upload-artifact@v3
if: ${{ ! matrix.full-gpu-tests }}
if: steps.filter.outputs.should-run == 'true' && ! matrix.full-gpu-tests
with:
name: slang-build-${{matrix.os}}-${{matrix.platform}}-${{matrix.compiler}}-${{matrix.config}}
# The install directory used in the packaging step
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
*.zip
*.ini
*.DS_store
.clang-format
.gdb_history
.vimspector
.vimspector.json
Expand Down
2 changes: 2 additions & 0 deletions docs/ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ only.
> Due to reliability issues, we are not currently using sccache, this is
> historical/aspirational.

blah blah

The CI actions use sccache, keyed on compiler and platform, this runs on all
configurations and significantly speeds up small source change builds. This
cache can be safely missed without a large impact on build times.