-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (45 loc) · 2.11 KB
/
Copy pathmain.yml
File metadata and controls
55 lines (45 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: CI
on: [pull_request, push]
jobs:
CI:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 2
- name: modified_files
run: |
files=$(git diff --diff-filter=AM --no-commit-id --name-only HEAD~1 -- '***.simc' | xargs)
echo "MODIFIED_FILES=$files" >> $GITHUB_ENV
- name: validate_python
run: |
python ${{ runner.workspace }}/simc-profile/scripts/validate.py \
${{ env.MODIFIED_FILES }}
- uses: ./.github/workflows/setup_simc
id: setup
- name: validate_simc_pr
if: github.event_name == 'pull_request'
run: |
python ${{ runner.workspace }}/simc-profile/scripts/execute.py \
${{ env.MODIFIED_FILES }} -b ${{ runner.workspace }}/simc-profile/simc-profile/simc/b/ninja/simc \
--save .
- name: execute_simc_pr
if: github.event_name == 'pull_request'
run: |
python ${{ runner.workspace }}/simc-profile/scripts/execute.py \
${{ env.MODIFIED_FILES }} -b ${{ runner.workspace }}/simc-profile/simc-profile/simc/b/ninja/simc \
--execute
- name: validate_simc_main
if: github.event_name == 'push' && ( success() || failure() ) && github.repository == 'simulationcraft/simc-profile' && github.ref_name == github.event.repository.default_branch
run: |
find ${{ runner.workspace }}/simc-profile/profiles -type f \
| xargs python ${{ runner.workspace }}/simc-profile/scripts/execute.py \
-b ${{ runner.workspace }}/simc-profile/simc-profile/simc/b/ninja/simc \
--save .
- name: execute_simc_main
if: github.event_name == 'push' && ( success() || failure() ) && github.repository == 'simulationcraft/simc-profile' && github.ref_name == github.event.repository.default_branch
run: |
find ${{ runner.workspace }}/simc-profile/profiles -type f \
| xargs python ${{ runner.workspace }}/simc-profile/scripts/execute.py \
-b ${{ runner.workspace }}/simc-profile/simc-profile/simc/b/ninja/simc \
--execute