-
-
Notifications
You must be signed in to change notification settings - Fork 11
43 lines (39 loc) · 1.42 KB
/
Copy pathrust.yml
File metadata and controls
43 lines (39 loc) · 1.42 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
name: Check Rust slides
on:
push:
paths:
- slides/**
workflow_dispatch:
# Running these checks on GitHub Actions takes 10 minutes. It is a waste of time if the files have not changed.
jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout site source
uses: actions/checkout@v6
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v47
- name: List all changed files
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
echo "$ALL_CHANGED_FILES"
echo "------"
for file in ${ALL_CHANGED_FILES}; do
echo "$file was changed"
done
CHANGED_FOLDERS=$(perl -E'say join " ", grep { $_ ne "" and not $uniq{$_}++ } map {m{/(examples/[^/]+/[^/]+)}; $1} @ARGV' $ALL_CHANGED_FILES)
echo "CHANGED_FOLDERS: $CHANGED_FOLDERS"
echo $CHANGED_FOLDERS > folders.txt
- name: Check the slides
run: |
CHANGED_FOLDERS=$(cat folders.txt)
echo "CHANGED_FOLDERS: $CHANGED_FOLDERS"
# cd slides/rust
# # comment out as it takes 10 minutes to run
# # maybe we could improve it by sharing some of the binaries and/or caching
# if [ "$CHANGED_FOLDERS" != "" ]; then
# ./check.sh --verbose --cleanup --use-examples --check $CHANGED_FOLDERS
# fi