From 4aa833c74aec7c6f9848f9177fbdeb17e47097f5 Mon Sep 17 00:00:00 2001 From: Curtis Rueden Date: Fri, 2 Feb 2024 12:37:54 -0600 Subject: [PATCH] Really fix the Windows CI build This works around a weird problem with make + bash, where there is some sort of mismatch between the MinGW programs and the built-in Windows ones. It may happen because Jaunch's Makefile targets call shell scripts that require bash, and somehow the wrong bash is chosen, which triggers a Windows error about how WSL needs to be installed. I'm mostly just speculating. But whatever is actually going on, in this case, using a shebang of `#!/usr/bin/env bash` avoids the issue. See also actions/runner-images#7253. --- .github/workflows/build.yml | 6 ------ bin/app.sh | 2 +- bin/clean.sh | 2 +- bin/compile-configurator.sh | 2 +- bin/compile-launcher.sh | 2 +- bin/help.sh | 2 +- bin/test.sh | 2 +- 7 files changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2e25178..80d523e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,12 +24,6 @@ jobs: java-version: '21' cache: 'gradle' - - name: Enable MinGW - if: runner.os == 'Windows' - # https://stackoverflow.com/a/77298592/1207769 - run: | - $env:PATH = "C:\msys64\usr\bin;$env:PATH" - - name: Build run: make compile-all diff --git a/bin/app.sh b/bin/app.sh index fe491ef..ab3cd33 100755 --- a/bin/app.sh +++ b/bin/app.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e cd "$(dirname "$0")/.." echo diff --git a/bin/clean.sh b/bin/clean.sh index 197a294..70a861f 100755 --- a/bin/clean.sh +++ b/bin/clean.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e cd "$(dirname "$0")/.." echo diff --git a/bin/compile-configurator.sh b/bin/compile-configurator.sh index e62ecd5..4f74c58 100755 --- a/bin/compile-configurator.sh +++ b/bin/compile-configurator.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e cd "$(dirname "$0")/.." echo diff --git a/bin/compile-launcher.sh b/bin/compile-launcher.sh index 0781b8a..0e5fc9d 100755 --- a/bin/compile-launcher.sh +++ b/bin/compile-launcher.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e cd "$(dirname "$0")/.." echo diff --git a/bin/help.sh b/bin/help.sh index eac504e..7b043c0 100755 --- a/bin/help.sh +++ b/bin/help.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash echo "Available targets: clean - remove build files and directories compile-launcher - compile the native launcher (C) diff --git a/bin/test.sh b/bin/test.sh index 1d41cd4..03f772f 100755 --- a/bin/test.sh +++ b/bin/test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e cd "$(dirname "$0")/.." echo