From 3e6153a55211a2590052664ba1b4093aaa97fc83 Mon Sep 17 00:00:00 2001 From: Kenjiro Nakayama Date: Tue, 17 Dec 2024 18:31:06 +0900 Subject: unset CC only for mingw and arm32 Since `scripts/test` always unset "CC", the github action for "clang" in Linux does not use clang unintentionally. This patch unset CC only for mingw{32,64} and arm32. --- .github/workflows/linux.yml | 3 +++ scripts/test | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 0c9a699..af7dfab 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -32,6 +32,9 @@ jobs: - os: "ubuntu-22.04" arch: "native" compiler: "clang" + - os: "ubuntu-24.04" + arch: "native" + compiler: "clang" steps: - name: "Checkout repository" uses: actions/checkout@v4 diff --git a/scripts/test b/scripts/test index e389728..abfa038 100755 --- a/scripts/test +++ b/scripts/test @@ -2,7 +2,10 @@ set -e set -x -unset CC +if [ "$ARCH" = "mingw32" ] || [ "$ARCH" = "mingw64" ] || [ "$ARCH" = "arm32" ]; then + unset CC +fi + ENABLE_ASM="${ENABLE_ASM:=ON}" if type apt-get >/dev/null 2>&1; then -- cgit v1.2.3-55-g6feb From 9ed5c54fed283b05fe0a89f47fbfcc302372ad42 Mon Sep 17 00:00:00 2001 From: Kenjiro Nakayama Date: Wed, 18 Dec 2024 09:24:28 +0900 Subject: update style --- scripts/test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test b/scripts/test index abfa038..e3044b0 100755 --- a/scripts/test +++ b/scripts/test @@ -2,7 +2,7 @@ set -e set -x -if [ "$ARCH" = "mingw32" ] || [ "$ARCH" = "mingw64" ] || [ "$ARCH" = "arm32" ]; then +if [ "$ARCH" = "mingw32" -o "$ARCH" = "mingw64" -o "$ARCH" = "arm32" ]; then unset CC fi -- cgit v1.2.3-55-g6feb From 12031e4e9a1f46ae41d936e2f1a5261a95cb85f8 Mon Sep 17 00:00:00 2001 From: Kenjiro Nakayama Date: Wed, 18 Dec 2024 09:38:35 +0900 Subject: Move ARCH check --- scripts/test | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/test b/scripts/test index e3044b0..1fb02eb 100755 --- a/scripts/test +++ b/scripts/test @@ -2,6 +2,10 @@ set -e set -x +if [ "$ARCH" = "" ]; then + ARCH=`uname -m` +fi + if [ "$ARCH" = "mingw32" -o "$ARCH" = "mingw64" -o "$ARCH" = "arm32" ]; then unset CC fi @@ -18,10 +22,6 @@ fi VERSION=`cat VERSION` -if [ "$ARCH" = "" ]; then - ARCH=`uname -m` -fi - # test macOS if [ `uname` = "Darwin" ]; then # test autotools -- cgit v1.2.3-55-g6feb