From 0a03f2dc3c4140db0976e3879a4e326d6b1d0629 Mon Sep 17 00:00:00 2001 From: Afshin Arani Date: Tue, 17 Oct 2023 12:49:19 +0330 Subject: [PATCH] GithubCI: upgrade actions to latest version Installing git before checkout was necessary to prevent this error when git wants to interact with the checked out repo (Probably because it's downloaded using Github's REST API): ``` fatal: not a git repository (or any parent up to mount point /) ``` Installing git before checkout also removes the problem with using submodule parameter in checkout action so the comments we had are no longer applicable. This was done to fix errors we had with downloading actions [1]. [1] https://github.com/nblockchain/geewallet/pull/224#issuecomment-1758907752 --- .github/workflows/CI.yml | 92 +++++++++++++++++++++------------------- 1 file changed, 48 insertions(+), 44 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index fba5af706..9d8331718 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -11,11 +11,11 @@ jobs: macOS--dotnet6-and-mono: runs-on: macOS-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4.1.0 with: submodules: false - name: Setup .NET SDK 6.0.x - uses: actions/setup-dotnet@v1.7.2 + uses: actions/setup-dotnet@v3.2.0 with: dotnet-version: '6.0.113' - name: configure @@ -44,7 +44,7 @@ jobs: macOS--mono-only: runs-on: macOS-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4.1.0 with: submodules: false - name: HACK to emulate dotnet uninstall @@ -67,7 +67,7 @@ jobs: macOS--dotnet6-only: runs-on: macOS-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4.1.0 with: submodules: false - name: HACK to emulate mono uninstall @@ -90,11 +90,11 @@ jobs: windows--dotnet6-and-legacyFramework: runs-on: windows-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4.1.0 with: submodules: false - name: Setup .NET SDK 6.0.x - uses: actions/setup-dotnet@v1.7.2 + uses: actions/setup-dotnet@v3.2.0 with: dotnet-version: '6.0.113' - name: configure @@ -124,7 +124,7 @@ jobs: windows--legacyFramework-only: runs-on: windows-2019 steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4.1.0 with: submodules: false - name: HACK to emulate dotnet uninstall @@ -147,11 +147,11 @@ jobs: windows--dotnet6-only: runs-on: windows-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4.1.0 with: submodules: false - name: Setup .NET SDK 6.0.x - uses: actions/setup-dotnet@v1.7.2 + uses: actions/setup-dotnet@v3.2.0 with: dotnet-version: '6.0.113' - name: HACK to emulate legacy .NETFramework uninstall @@ -183,7 +183,7 @@ jobs: linux-github--dotnet-and-mono: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4.1.0 with: submodules: false - name: install missing dependencies @@ -208,7 +208,7 @@ jobs: linux-github--dotnet-and-newmono: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4.1.0 with: submodules: false - name: install missing dependencies @@ -240,19 +240,17 @@ jobs: container: image: "ubuntu:22.04" steps: - - uses: actions/checkout@v1 - # can't use the option below because of error "Input 'submodules' not supported when falling back to download using the GitHub REST API. To create a local Git repository instead, add Git 2.18 or higher to the PATH." - # with: - # submodules: 'true' - - name: install sudo run: apt update && apt install --yes sudo + - name: install git + run: sudo apt install --yes git + - uses: actions/checkout@v4.1.0 - name: install all dependencies run: | # needed by fsx submodule sudo apt install --yes curl - sudo DEBIAN_FRONTEND=noninteractive apt install --yes git make fsharp nunit-console + sudo DEBIAN_FRONTEND=noninteractive apt install --yes make fsharp nunit-console # workaround for https://github.com/actions/runner/issues/2033 - name: ownership workaround @@ -280,15 +278,16 @@ jobs: container: image: "ubuntu:22.04" steps: - - uses: actions/checkout@v1 - # can't use the option below because of error "Input 'submodules' not supported when falling back to download using the GitHub REST API. To create a local Git repository instead, add Git 2.18 or higher to the PATH." - # with: - # submodules: 'true' - - name: install sudo run: apt update && apt install --yes sudo + - name: install git + run: sudo apt install --yes git + - uses: actions/checkout@v4.1.0 + # Cloning with submodules cause fsxc to try compiling fsx test scripts and fail + # with: + # submodules: 'true' - name: install all dependencies - run: sudo DEBIAN_FRONTEND=noninteractive apt install --yes git make dotnet6 + run: sudo DEBIAN_FRONTEND=noninteractive apt install --yes make dotnet6 # workaround for https://github.com/actions/runner/issues/2033 - name: ownership workaround @@ -322,15 +321,16 @@ jobs: container: image: "ubuntu:22.04" steps: - - uses: actions/checkout@v1 - # can't use the option below because of error "Input 'submodules' not supported when falling back to download using the GitHub REST API. To create a local Git repository instead, add Git 2.18 or higher to the PATH." - # with: - # submodules: 'true' - - name: install sudo run: apt update && apt install --yes sudo + - name: install git + run: sudo apt install --yes git + - uses: actions/checkout@v4.1.0 + # Cloning with submodules cause fsxc to try compiling fsx test scripts and fail + # with: + # submodules: 'true' - name: install all dependencies - run: sudo DEBIAN_FRONTEND=noninteractive apt install --yes git make dotnet6 + run: sudo DEBIAN_FRONTEND=noninteractive apt install --yes make dotnet6 - name: install last version of mono (Microsoft APT repositories) run: sudo ./scripts/install_mono_from_microsoft_deb_packages.sh @@ -366,15 +366,17 @@ jobs: container: image: "ubuntu:22.04" steps: - - uses: actions/checkout@v1 - # can't use the option below because of error "Input 'submodules' not supported when falling back to download using the GitHub REST API. To create a local Git repository instead, add Git 2.18 or higher to the PATH." + - name: install sudo + run: apt update && apt install --yes sudo + - name: install git + run: sudo apt install --yes git + - uses: actions/checkout@v4.1.0 + # Cloning with submodules cause fsxc to try compiling fsx test scripts and fail # with: # submodules: 'true' - - name: install sudo - run: apt update && apt install --yes sudo - name: install all dependencies - run: sudo DEBIAN_FRONTEND=noninteractive apt install --yes git make dotnet6 mono-xbuild fsharp + run: sudo DEBIAN_FRONTEND=noninteractive apt install --yes make dotnet6 mono-xbuild fsharp - name: install GTK libs (dependency of GTK frontend) run: sudo apt install --yes libgtk2.0-cil-dev # workaround for https://github.com/actions/runner/issues/2033 @@ -409,15 +411,13 @@ jobs: container: image: "ubuntu:22.04" steps: - - uses: actions/checkout@v1 - # can't use the option below because of error "Input 'submodules' not supported when falling back to download using the GitHub REST API. To create a local Git repository instead, add Git 2.18 or higher to the PATH." - # with: - # submodules: 'true' - - name: install sudo run: apt update && apt install --yes sudo + - name: install git + run: sudo apt install --yes git + - uses: actions/checkout@v4.1.0 - name: install all dependencies - run: sudo DEBIAN_FRONTEND=noninteractive apt install --yes git make fsharp nunit-console + run: sudo DEBIAN_FRONTEND=noninteractive apt install --yes make fsharp nunit-console - name: install last version of mono (Microsoft APT repositories) run: sudo ./scripts/install_mono_from_microsoft_deb_packages.sh @@ -465,15 +465,19 @@ jobs: - macOS--dotnet6-only steps: - - uses: actions/checkout@v1 + - name: install sudo + run: which sudo 2>/dev/null || (apt update && apt install --yes sudo) + - name: install git + run: sudo apt install --yes git + - uses: actions/checkout@v4.1.0 with: submodules: false + fetch-depth: 0 - name: Install dependencies of commitlint run: | - which sudo 2>/dev/null || (apt update && apt install --yes sudo) sudo apt update - sudo apt install --yes git npm curl + sudo apt install --yes npm curl sudo npm install --global n sudo n lts # workaround for https://github.com/actions/runner/issues/2033 @@ -497,7 +501,7 @@ jobs: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4.1.0 - name: Install snap tools run: | sudo apt update