Skip to content

Commit f5180a6

Browse files
authored
Manage dependencies via luthier (#111)
We've already hit a wall with git-subrepo in #105 because subrepos interact awfully with submodules. All of this is miserable, and I think we're going to go the way that every mid-sized C++ project with dependencies must go to stay sane: embracing their own bespoke tool. As such, I've replaced the check-in for every dependency here with a `foo.tune` file in `extern` that describes the remote source and the tag that we would like to check out, and `luthier` now has the ability to fetch dependencies. It will do this as part of a `configure` step, but you can also invoke it directly with the `fetch` subcommand.
1 parent caabb52 commit f5180a6

File tree

8,155 files changed

+128
-3585734
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

8,155 files changed

+128
-3585734
lines changed

.github/workflows/ci.yml

Lines changed: 56 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: build
22

33
on:
44
push:
5-
branches: [ "primary" ]
5+
branches: ["primary"]
66
pull_request:
7-
branches: [ "primary" ]
7+
branches: ["primary"]
88

99
jobs:
1010
build:
@@ -15,47 +15,63 @@ jobs:
1515
fail-fast: false
1616

1717
matrix:
18-
os: [ubuntu-latest, windows-latest]
19-
build_type: [Debug]
20-
c_compiler: [gcc, clang, cl]
18+
os: [ubuntu-latest, macos-latest, windows-latest]
19+
build_type: [debug]
2120
include:
2221
- os: windows-latest
23-
c_compiler: cl
24-
cpp_compiler: cl
2522
- os: ubuntu-latest
26-
c_compiler: gcc
27-
cpp_compiler: g++
23+
compiler_options: --c-compiler=gcc --cxx-compiler=g++
2824
- os: ubuntu-latest
29-
c_compiler: clang
30-
cpp_compiler: clang++
31-
exclude:
32-
- os: windows-latest
33-
c_compiler: gcc
34-
- os: windows-latest
35-
c_compiler: clang
36-
- os: ubuntu-latest
37-
c_compiler: cl
25+
compiler_options: --c-compiler=clang --cxx-compiler=clang++
26+
- os: macos-latest
27+
compiler_options: --c-compiler=clang --cxx-compiler=clang++
3828

3929
steps:
40-
- uses: actions/checkout@v4
41-
42-
- name: Set reusable strings
43-
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
44-
id: strings
45-
shell: bash
46-
run: |
47-
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
48-
49-
- name: Configure CMake
50-
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
51-
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
52-
run: >
53-
cmake -B ${{ steps.strings.outputs.build-output-dir }}
54-
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
55-
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
56-
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
57-
-S ${{ github.workspace }}
58-
59-
- name: Build
60-
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
61-
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} --parallel
30+
- uses: actions/checkout@v4
31+
32+
- name: Set reusable strings
33+
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
34+
id: strings
35+
shell: bash
36+
run: |
37+
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
38+
39+
- name: Set up Python
40+
uses: actions/setup-python@v5
41+
with:
42+
python-version: "3.11"
43+
44+
- name: Install dependencies (Linux)
45+
if: runner.os == 'Linux'
46+
run: |
47+
sudo apt-get update
48+
sudo apt-get install -y ninja-build clang
49+
50+
- name: Install dependencies (macOS)
51+
if: runner.os == 'macOS'
52+
run: |
53+
brew update
54+
brew install cmake ninja
55+
brew unlink brotli zstd
56+
57+
- name: Install dependencies (Windows)
58+
if: runner.os == 'Windows'
59+
run: |
60+
choco install ninja
61+
62+
- if: runner.os == 'Windows'
63+
uses: ilammy/msvc-dev-cmd@v1
64+
65+
- name: luthier configure
66+
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
67+
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
68+
run: >
69+
python3 ./tools/luthier.py configure lute
70+
--config=${{ matrix.build_type }}
71+
${{ matrix.compiler_options }}
72+
73+
- name: luthier build
74+
run: >
75+
python3 ./tools/luthier.py build lute
76+
--config=${{ matrix.build_type }}
77+
${{ matrix.compiler_options }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ compile_commands.json
1717
*~
1818
extern/libuv/libuv-static.pc
1919
extern/libuv/DartConfiguration.tcl
20+
extern/*/

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ set(USE_NGHTTP2 OFF)
4242
set(CURL_USE_LIBPSL OFF)
4343
set(CURL_USE_LIBSSH2 OFF)
4444
set(CURL_ZLIB OFF)
45+
set(CURL_BROTLI OFF)
4546
set(BUILD_EXAMPLES OFF)
4647
set(BUILD_CURL_EXE OFF)
4748
set(BUILD_SHARED_LIBS OFF)

extern/curl.tune

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[dependency]
2+
name = "curl"
3+
remote = "https://github.com/curl/curl.git"
4+
branch = "curl-8_12_1"

extern/curl/.circleci/config.yml

Lines changed: 0 additions & 267 deletions
This file was deleted.

0 commit comments

Comments
 (0)