Skip to content

Commit

Permalink
.github: use new checkout v4 option "filter: tree:0"
Browse files Browse the repository at this point in the history
This saves time without affecting git describe like fetch depth does.

Also cancel fetch depth when building the firmware.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
  • Loading branch information
marc-hb authored and kv2019i committed Jan 29, 2024
1 parent da2b026 commit 46eb79e
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
- uses: actions/checkout@v4
with:
path: ./workspace/sof
filter: 'tree:0'

- name: west update
run: |
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/codestyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
filter: 'tree:0'

- name: run yamllint
# Quoting to please all parsers is hard. This indirection helps.
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ jobs:

steps:
- uses: actions/checkout@v4
# From time to time this will catch a git tag and change SOF_VERSION
with: {fetch-depth: 50, submodules: recursive}
with: {fetch-depth: 0, submodules: recursive, filter: 'tree:0'}

- name: docker
run: docker pull thesofproject/sof && docker tag thesofproject/sof sof
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ipc_fuzzer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ jobs:
- uses: actions/checkout@v4
with:
path: ./workspace/sof
filter: 'tree:0'

- name: west update
run: |
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
filter: 'tree:0'

- name: apt get doxygen graphviz
run: sudo apt-get -y install ninja-build doxygen graphviz
Expand Down Expand Up @@ -72,6 +74,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
filter: 'tree:0'

- name: apt-get update
run: sudo apt-get update
Expand Down Expand Up @@ -107,7 +111,7 @@ jobs:

steps:
- uses: actions/checkout@v4
with: {fetch-depth: 5, submodules: recursive}
with: {fetch-depth: 0, submodules: recursive, filter: 'tree:0'}

- name: docker
run: docker pull thesofproject/sof && docker tag thesofproject/sof sof
Expand All @@ -134,7 +138,7 @@ jobs:
steps:

- uses: actions/checkout@v4
with: {fetch-depth: 0, submodules: recursive}
with: {fetch-depth: 0, submodules: recursive, filter: 'tree:0'}

- name: docker
run: docker pull thesofproject/sof && docker tag thesofproject/sof sof
Expand Down Expand Up @@ -169,7 +173,7 @@ jobs:
steps:

- uses: actions/checkout@v4
with: {fetch-depth: 0, submodules: recursive}
with: {fetch-depth: 0, submodules: recursive, filter: 'tree:0'}

- name: turn off HAVE_AGENT
run: echo CONFIG_HAVE_AGENT=n >
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/repro-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

steps:
- uses: actions/checkout@v4
with: {fetch-depth: 5, submodules: recursive}
with: {fetch-depth: 0, submodules: recursive, filter: 'tree:0'}

- name: docker pull
run: docker pull thesofproject/sof && docker tag thesofproject/sof sof
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/testbench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:

steps:
- uses: actions/checkout@v4
with: {fetch-depth: 5}
with: {fetch-depth: 0, filter: 'tree:0'}

- name: apt get
run: sudo apt-get update &&
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
filter: 'tree:0'

# The ALSA version in Ubuntu 20.04 is buggy
# (https://github.com/thesofproject/sof/issues/2543) and likely
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with: {fetch-depth: 2}
with: {fetch-depth: 2, filter: 'tree:0'}

- name: build and run all defconfigs
run: ./test/test-all-defconfigs.sh
5 changes: 5 additions & 0 deletions .github/workflows/zephyr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
- uses: actions/checkout@v4
with:
path: ./workspace/sof
filter: 'tree:0'

- name: plain west update
run: |
Expand Down Expand Up @@ -70,6 +71,7 @@ jobs:
- uses: actions/checkout@v4
with:
path: ./workspace/sof
filter: 'tree:0'

- name: west clones
run: pip3 install west && cd workspace/sof/ && west init -l &&
Expand Down Expand Up @@ -128,6 +130,7 @@ jobs:
# This is especially useful for daily builds (but not just).
with:
fetch-depth: 0
filter: 'tree:0'
path: ./workspace/sof

- name: west clones
Expand Down Expand Up @@ -227,6 +230,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
filter: 'tree:0'
path: ./workspace/sof

# Cache artifacts so we do not overload external servers with downloads
Expand Down Expand Up @@ -381,6 +385,7 @@ jobs:
# Isolate the clone in a subdirectory to make sure globbing
# does not catch random SOF files.
path: ./sof
filter: 'tree:0'

- name: Download Windows and Linux builds
uses: actions/download-artifact@v3
Expand Down

0 comments on commit 46eb79e

Please sign in to comment.