Skip to content

Commit

Permalink
@@@ debug CI
Browse files Browse the repository at this point in the history
  • Loading branch information
strager committed Feb 11, 2024
1 parent 71212df commit db07025
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions .github/workflows/build-static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ jobs:
matrix:
toolchain:
# @@@
#- {runs_on: macos-12, name: "macOS x86_64", archive_name: "macos", archive_extension: ".tar.gz", test: true, CC: /usr/local/opt/llvm@15/bin/clang, CXX: /usr/local/opt/llvm@15/bin/clang++, CFLAGS: "-isystem /usr/local/opt/llvm@15/include -isystem /usr/local/opt/llvm@15/include/c++/v1 -mmacosx-version-min=10.9 -D_LIBCPP_DISABLE_AVAILABILITY", LDFLAGS: "-L/usr/local/opt/llvm@15/lib -mlinker-version=278 -nostdlib++ /usr/local/opt/llvm@15/lib/c++/libc++.a /usr/local/opt/llvm@15/lib/c++/libc++abi.a", CMAKE_FLAGS: "-G Ninja", homebrew_packages: "ninja"}
#- {runs_on: stracle-macos-aarch64, name: "macOS AArch64", archive_name: "macos-aarch64", archive_extension: ".tar.gz", test: true, CFLAGS: "-mmacosx-version-min=11.0", CMAKE_FLAGS: "-G Ninja"}
#- {runs_on: ubuntu-latest, name: "Linux x86_64", archive_name: "linux", archive_extension: ".tar.gz", docker_container: "ghcr.io/quick-lint/quick-lint-js-github-baseline-builder:v1", test: true, LDFLAGS: "-static-libgcc -static-libstdc++", CMAKE_FLAGS: "-G Ninja"}
#- {runs_on: ubuntu-latest, name: "Linux ARM", archive_name: "linux-armhf", archive_extension: ".tar.gz", docker_container: "ghcr.io/quick-lint/quick-lint-js-github-cross-builder:v3", test: false, cross_compiling: true, CMAKE_FLAGS: "-DCMAKE_TOOLCHAIN_FILE=.github/toolchain-linux-armhf.cmake -G Ninja", LDFLAGS: "-static-libgcc -static-libstdc++"}
#- {runs_on: ubuntu-latest, name: "Linux AArch64", archive_name: "linux-aarch64", archive_extension: ".tar.gz", docker_container: "ghcr.io/quick-lint/quick-lint-js-github-cross-builder:v3", test: false, cross_compiling: true, CMAKE_FLAGS: "-DCMAKE_TOOLCHAIN_FILE=.github/toolchain-linux-aarch64.cmake -G Ninja", LDFLAGS: "-static-libgcc -static-libstdc++"}
- {runs_on: macos-12, name: "macOS x86_64", archive_name: "macos", archive_extension: ".tar.gz", test: true, CC: /usr/local/opt/llvm@15/bin/clang, CXX: /usr/local/opt/llvm@15/bin/clang++, CFLAGS: "-isystem /usr/local/opt/llvm@15/include -isystem /usr/local/opt/llvm@15/include/c++/v1 -mmacosx-version-min=10.9 -D_LIBCPP_DISABLE_AVAILABILITY", LDFLAGS: "-L/usr/local/opt/llvm@15/lib -mlinker-version=278 -nostdlib++ /usr/local/opt/llvm@15/lib/c++/libc++.a /usr/local/opt/llvm@15/lib/c++/libc++abi.a", CMAKE_FLAGS: "-G Ninja", homebrew_packages: "ninja"}
- {runs_on: stracle-macos-aarch64, name: "macOS AArch64", archive_name: "macos-aarch64", archive_extension: ".tar.gz", test: true, CFLAGS: "-mmacosx-version-min=11.0", CMAKE_FLAGS: "-G Ninja"}
- {runs_on: ubuntu-latest, name: "Linux x86_64", archive_name: "linux", archive_extension: ".tar.gz", docker_container: "ghcr.io/quick-lint/quick-lint-js-github-baseline-builder:v1", test: true, LDFLAGS: "-static-libgcc -static-libstdc++", CMAKE_FLAGS: "-G Ninja"}
- {runs_on: ubuntu-latest, name: "Linux ARM", archive_name: "linux-armhf", archive_extension: ".tar.gz", docker_container: "ghcr.io/quick-lint/quick-lint-js-github-cross-builder:v3", test: false, cross_compiling: true, CMAKE_FLAGS: "-DCMAKE_TOOLCHAIN_FILE=.github/toolchain-linux-armhf.cmake -G Ninja", LDFLAGS: "-static-libgcc -static-libstdc++"}
- {runs_on: ubuntu-latest, name: "Linux AArch64", archive_name: "linux-aarch64", archive_extension: ".tar.gz", docker_container: "ghcr.io/quick-lint/quick-lint-js-github-cross-builder:v3", test: false, cross_compiling: true, CMAKE_FLAGS: "-DCMAKE_TOOLCHAIN_FILE=.github/toolchain-linux-aarch64.cmake -G Ninja", LDFLAGS: "-static-libgcc -static-libstdc++"}
# HACK(strager): -Wl,-allow-multiple-definition works around a GCC bug: https://sourceware.org/bugzilla/show_bug.cgi?id=12762
#- {runs_on: windows-2022, name: "Windows x86", archive_name: "windows-x86", archive_extension: ".zip", test: true, CC: "c:/msys64/mingw32/bin/gcc.exe", CXX: "c:/msys64/mingw32/bin/g++.exe", CMAKE_FLAGS: "-G Ninja", chocolatey_packages: "ninja", msys2_packages: "mingw-w64-i686-gcc ninja", LDFLAGS: "-static -Wl,-allow-multiple-definition"}
- {runs_on: windows-2022, name: "Windows x86", archive_name: "windows-x86", archive_extension: ".zip", test: true, CC: "c:/msys64/mingw32/bin/gcc.exe", CXX: "c:/msys64/mingw32/bin/g++.exe", CMAKE_FLAGS: "-G Ninja", chocolatey_packages: "ninja", msys2_packages: "mingw-w64-i686-gcc ninja", LDFLAGS: "-static -Wl,-allow-multiple-definition"}
- {runs_on: windows-2022, name: "Windows x64", archive_name: "windows", archive_extension: ".zip", test: true, CC: "c:/msys64/ucrt64/bin/gcc.exe", CXX: "c:/msys64/ucrt64/bin/g++.exe", CMAKE_FLAGS: "-G Ninja", chocolatey_packages: "ninja", msys2_packages: "mingw-w64-ucrt-x86_64-gcc ninja", LDFLAGS: "-static"}
#- {runs_on: ubuntu-latest, name: "Windows ARM", archive_name: "windows-arm", archive_extension: ".zip", docker_container: "ghcr.io/quick-lint/quick-lint-js-github-mingw-builder:v3", test: false, cross_compiling: true, CMAKE_FLAGS: "-DCMAKE_TOOLCHAIN_FILE=.github/toolchain-mingw-armv7.cmake -G Ninja", LDFLAGS: "-static -Wl,-allow-multiple-definition"}
#- {runs_on: ubuntu-latest, name: "Windows ARM64", archive_name: "windows-arm64", archive_extension: ".zip", docker_container: "ghcr.io/quick-lint/quick-lint-js-github-mingw-builder:v3", test: false, cross_compiling: true, CMAKE_FLAGS: "-DCMAKE_TOOLCHAIN_FILE=.github/toolchain-mingw-aarch64.cmake -G Ninja", LDFLAGS: "-static -Wl,-allow-multiple-definition"}
- {runs_on: ubuntu-latest, name: "Windows ARM", archive_name: "windows-arm", archive_extension: ".zip", docker_container: "ghcr.io/quick-lint/quick-lint-js-github-mingw-builder:v3", test: false, cross_compiling: true, CMAKE_FLAGS: "-DCMAKE_TOOLCHAIN_FILE=.github/toolchain-mingw-armv7.cmake -G Ninja", LDFLAGS: "-static -Wl,-allow-multiple-definition"}
- {runs_on: ubuntu-latest, name: "Windows ARM64", archive_name: "windows-arm64", archive_extension: ".zip", docker_container: "ghcr.io/quick-lint/quick-lint-js-github-mingw-builder:v3", test: false, cross_compiling: true, CMAKE_FLAGS: "-DCMAKE_TOOLCHAIN_FILE=.github/toolchain-mingw-aarch64.cmake -G Ninja", LDFLAGS: "-static -Wl,-allow-multiple-definition"}
runs-on: ${{ matrix.toolchain.runs_on }}
container: ${{ matrix.toolchain.docker_container }}
env:
Expand Down Expand Up @@ -96,6 +96,7 @@ jobs:
import os
import shlex
import subprocess
import sys
def var(name):
return os.environ.get(name, '')
Expand All @@ -107,9 +108,9 @@ jobs:
"-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=YES",
"-S", ".", "-B", "build",
f"-DCMAKE_C_FLAGS={var('CMAKE_C_FLAGS')}",
f"-DCMAKE_CXX_FLAGS=${var('CMAKE_CXX_FLAGS')}",
f"-DCMAKE_EXE_LINKER_FLAGS=${var('CMAKE_EXE_LINKER_FLAGS')}",
f"-DCMAKE_SHARED_LINKER_FLAGS=${var('CMAKE_SHARED_LINKER_FLAGS')}",
f"-DCMAKE_CXX_FLAGS={var('CMAKE_CXX_FLAGS')}",
f"-DCMAKE_EXE_LINKER_FLAGS={var('CMAKE_EXE_LINKER_FLAGS')}",
f"-DCMAKE_SHARED_LINKER_FLAGS={var('CMAKE_SHARED_LINKER_FLAGS')}",
]
c_compiler = var('CMAKE_C_COMPILER')
if c_compiler: command.append(f"-DCMAKE_C_COMPILER={c_compiler}")
Expand All @@ -119,9 +120,9 @@ jobs:
commands.extend(f"-DQUICK_LINT_JS_USE_BUILD_TOOLS={os.getcwd()}/build-tools")
command.extend(var('CMAKE_EXTRA_FLAGS').split())
print(" ".join(shlex.quote(arg) for arg in command))
print(" ".join(shlex.quote(arg) for arg in command), file=sys.stderr)
result = subprocess.run(command)
os.exit(result.returncode)
exit(result.returncode)
shell: python

- name: build
Expand Down

0 comments on commit db07025

Please sign in to comment.