From 46eb79eb4588a3b044f2bf72ab3566c7086397dd Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Thu, 25 Jan 2024 16:51:28 -0800 Subject: [PATCH] .github: use new checkout v4 option "filter: tree:0" This saves time without affecting git describe like fetch depth does. Also cancel fetch depth when building the firmware. Signed-off-by: Marc Herbert --- .github/workflows/build_all.yml | 1 + .github/workflows/codestyle.yml | 2 ++ .github/workflows/installer.yml | 3 +-- .github/workflows/ipc_fuzzer.yml | 1 + .github/workflows/pull-request.yml | 10 +++++++--- .github/workflows/repro-build.yml | 2 +- .github/workflows/testbench.yml | 2 +- .github/workflows/tools.yml | 2 ++ .github/workflows/unit-tests.yml | 2 +- .github/workflows/zephyr.yml | 5 +++++ 10 files changed, 22 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build_all.yml b/.github/workflows/build_all.yml index ed79d9153be1..84d2b373ab8f 100644 --- a/.github/workflows/build_all.yml +++ b/.github/workflows/build_all.yml @@ -48,6 +48,7 @@ jobs: - uses: actions/checkout@v4 with: path: ./workspace/sof + filter: 'tree:0' - name: west update run: | diff --git a/.github/workflows/codestyle.yml b/.github/workflows/codestyle.yml index 6995d405138b..63a076fc086a 100644 --- a/.github/workflows/codestyle.yml +++ b/.github/workflows/codestyle.yml @@ -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. diff --git a/.github/workflows/installer.yml b/.github/workflows/installer.yml index 0f9e8859d85b..d85e7f071176 100644 --- a/.github/workflows/installer.yml +++ b/.github/workflows/installer.yml @@ -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 diff --git a/.github/workflows/ipc_fuzzer.yml b/.github/workflows/ipc_fuzzer.yml index 70581de003c0..9348f0d6ae03 100644 --- a/.github/workflows/ipc_fuzzer.yml +++ b/.github/workflows/ipc_fuzzer.yml @@ -63,6 +63,7 @@ jobs: - uses: actions/checkout@v4 with: path: ./workspace/sof + filter: 'tree:0' - name: west update run: | diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 9e12b07878bb..e430f387745f 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -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 @@ -72,6 +74,8 @@ jobs: steps: - uses: actions/checkout@v4 + with: + filter: 'tree:0' - name: apt-get update run: sudo apt-get update @@ -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 @@ -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 @@ -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 > diff --git a/.github/workflows/repro-build.yml b/.github/workflows/repro-build.yml index 2206b5765f7e..034ae4ac286a 100644 --- a/.github/workflows/repro-build.yml +++ b/.github/workflows/repro-build.yml @@ -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 diff --git a/.github/workflows/testbench.yml b/.github/workflows/testbench.yml index 0caa69600bb0..69fdd1b1dba3 100644 --- a/.github/workflows/testbench.yml +++ b/.github/workflows/testbench.yml @@ -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 && diff --git a/.github/workflows/tools.yml b/.github/workflows/tools.yml index bfafb841b34e..c111cc2b31af 100644 --- a/.github/workflows/tools.yml +++ b/.github/workflows/tools.yml @@ -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 diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 5299d2435fd1..391807f6a336 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -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 diff --git a/.github/workflows/zephyr.yml b/.github/workflows/zephyr.yml index 8b5e292e6e81..82573bbc7440 100644 --- a/.github/workflows/zephyr.yml +++ b/.github/workflows/zephyr.yml @@ -22,6 +22,7 @@ jobs: - uses: actions/checkout@v4 with: path: ./workspace/sof + filter: 'tree:0' - name: plain west update run: | @@ -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 && @@ -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 @@ -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 @@ -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