From: Emil Velikov Date: Mon, 2 Sep 2024 17:58:35 +0000 (+0100) Subject: ci: install git and checkout using it X-Git-Tag: v34~459 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=597259443937726d8713e5e81b2ab1c9a294ea41;p=thirdparty%2Fkmod.git ci: install git and checkout using it Atm the checkout action pulls the whole repo as tarball, since git is missing. Since we install packages via local actions, we need to first do an initial sparse checkout, install the packages (git including) and do a proper second checkout. At which point, the second checkout action claims to set safe.directory (it's the default) although in practise we need to do it again. Perhaps it's getting tripped by our initial sparse checkout? Either way, explicitly set the option so that git just works. Signed-off-by: Emil Velikov Link: https://github.com/kmod-project/kmod/pull/86 Signed-off-by: Lucas De Marchi --- diff --git a/.github/actions/setup-alpine/action.yml b/.github/actions/setup-alpine/action.yml index 1c7eae96..434398f4 100644 --- a/.github/actions/setup-alpine/action.yml +++ b/.github/actions/setup-alpine/action.yml @@ -12,6 +12,7 @@ runs: automake \ bash \ build-base \ + git \ gtk-doc \ libtool \ linux-edge-dev \ diff --git a/.github/actions/setup-archlinux/action.yml b/.github/actions/setup-archlinux/action.yml index 10be56b9..989739ac 100644 --- a/.github/actions/setup-archlinux/action.yml +++ b/.github/actions/setup-archlinux/action.yml @@ -17,4 +17,5 @@ runs: pacman --noconfirm -Su \ linux-headers \ scdoc \ + git \ gtk-doc diff --git a/.github/actions/setup-debian/action.yml b/.github/actions/setup-debian/action.yml index a0c45803..b60cd2ef 100644 --- a/.github/actions/setup-debian/action.yml +++ b/.github/actions/setup-debian/action.yml @@ -11,6 +11,7 @@ runs: build-essential \ autoconf \ automake \ + git \ gtk-doc-tools \ libssl-dev \ liblzma-dev \ diff --git a/.github/actions/setup-fedora/action.yml b/.github/actions/setup-fedora/action.yml index a2612e46..0d963bfe 100644 --- a/.github/actions/setup-fedora/action.yml +++ b/.github/actions/setup-fedora/action.yml @@ -17,6 +17,7 @@ runs: xz-devel \ libzstd-devel \ openssl-devel \ + git \ gtk-doc \ libtool \ scdoc diff --git a/.github/actions/setup-ubuntu/action.yml b/.github/actions/setup-ubuntu/action.yml index f60cb1de..62456d7d 100644 --- a/.github/actions/setup-ubuntu/action.yml +++ b/.github/actions/setup-ubuntu/action.yml @@ -11,6 +11,7 @@ runs: build-essential \ autoconf \ automake \ + git \ gtk-doc-tools \ libssl-dev \ liblzma-dev \ diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 55cf8379..d9115588 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -34,7 +34,10 @@ jobs: image: ${{ matrix.container }} steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - name: Sparse checkout the local actions + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + sparse-checkout: .github - uses: ./.github/actions/setup-ubuntu if: ${{ startsWith(matrix.container, 'ubuntu') }} @@ -47,6 +50,15 @@ jobs: - uses: ./.github/actions/setup-debian if: ${{ startsWith(matrix.container, 'debian') }} + - name: Checkout the whole project + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + + - name: Set the environment + run: | + # The second checkout above claims to set safe.directory, yet it + # doesn't quite work. Perhaps our double/sparse checkout is to blame? + git config --global --add safe.directory '*' + - name: configure run: | mkdir build