From 55c0170791c5f6021599c83e89e9836f14b4d00b Mon Sep 17 00:00:00 2001 From: iTrooz Date: Sat, 25 Nov 2023 15:42:51 +0100 Subject: [PATCH] git: add -x to CI steps where multiple commands are run (#1447) --- .github/workflows/analysis.yml | 1 + .github/workflows/build.yml | 8 ++++++++ .github/workflows/release.yml | 7 ++++++- .github/workflows/tests.yml | 1 + 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/analysis.yml b/.github/workflows/analysis.yml index d155fa2a6..5c34bf42f 100644 --- a/.github/workflows/analysis.yml +++ b/.github/workflows/analysis.yml @@ -46,6 +46,7 @@ jobs: - name: 🛠️ Build run: | + set -x mkdir -p build cd build CC=gcc-12 CXX=g++-12 cmake \ diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ce2db95ff..cc7207f01 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -72,6 +72,7 @@ jobs: # Windows cmake build - name: 🛠️ Build run: | + set -x mkdir -p build cd build @@ -112,6 +113,7 @@ jobs: - name: ⬇️ Download Mesa3D for NoGPU version shell: bash run: | + set -x echo "NoGPU version Powered by Mesa 3D : https://fdossena.com/?p=mesa%2Findex.frag" > build/install/MESA.md curl https://werwolv.net/downloads/mesa/MesaForWindows-x64-latest.7z -L -o mesa.7z 7z e mesa.7z @@ -192,6 +194,7 @@ jobs: - name: ⬇️ Patch and install custom glfw if: ${{matrix.custom_glfw}} run: | + set -x cd glfw git apply ../dist/macOS/0001-glfw-SW.patch @@ -211,6 +214,7 @@ jobs: # MacOS cmake build - name: 🛠️ Build run: | + set -x mkdir -p build cd build CC=$(brew --prefix gcc@12)/bin/gcc-12 \ @@ -340,6 +344,7 @@ jobs: # Ubuntu cmake build - name: 🛠️ Build run: | + set -x git config --global --add safe.directory '*' mkdir -p build cd build @@ -466,6 +471,7 @@ jobs: # ArchLinux cmake build - name: 🛠️ Build run: | + set -x mkdir -p build cd build CC=gcc CXX=g++ cmake -G "Ninja" \ @@ -498,6 +504,7 @@ jobs: # makepkg doesn't want to run as root, so I had to chmod 777 all over - name: 📦 Package ArchLinux .pkg.tar.zst run: | + set -x cd build # the name is a small trick to make makepkg recognize it as the source @@ -570,6 +577,7 @@ jobs: - name: ⬇️ Update all packages and install dependencies run: | + set -x dnf upgrade --disablerepo="*" --enablerepo="fedora,updates" -y dnf install --disablerepo="*" --enablerepo="fedora,updates" -y \ fedpkg \ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index efddf034a..bfd38c72d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,6 +21,7 @@ jobs: - name: 📜 Verify version and set version variable run: | + set -x project_version=`cat ImHex/VERSION` tag_version="${{github.event.release.tag_name}}" tag_version="${tag_version:1}" @@ -64,6 +65,7 @@ jobs: - name: 📜 Verify version and set version variable run: | + set -x project_version=`cat ImHex/VERSION` tag_version="${{github.event.release.tag_name}}" tag_version="${tag_version:1}" @@ -87,7 +89,8 @@ jobs: skip_unpack: true - name: 🗜️ Unzip files when needed - run: | + run: | + set -x for zipfile in ./*.zip do if [ `zipinfo -1 "$zipfile" | wc -l` -eq 1 ]; @@ -112,6 +115,7 @@ jobs: - name: ✒️ Prepare PKGBUILD run: | + set -x cp ImHex/dist/Arch/PKGBUILD . hash=`md5sum imhex-${{ env.IMHEX_VERSION }}-ArchLinux-x86_64.pkg.tar.zst | cut -d ' ' -f 1` @@ -150,6 +154,7 @@ jobs: WINGET_GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} if: "${{ env.WINGET_GITHUB_TOKEN != '' }}" run: | + set -x $tagname = $env:GITHUB_REF.Replace("refs/tags/", "") $version = $tagname.Replace("v", "") $url = "https://github.com/WerWolv/ImHex/releases/download/${tagname}/imhex-${version}-Windows-x86_64.msi" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c0fbec44c..c5ba21510 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -44,6 +44,7 @@ jobs: - name: 🛠️ Build run: | + set -x mkdir -p build cd build CC=gcc-12 CXX=g++-12 cmake \