Cache protoc build and hopefully fix Windows build
Some checks failed
Build / download-system-deps (push) Successful in 39s
Build / build-gentoo (push) Successful in 1m32s
Build / get-source-code (push) Successful in 1m52s
Build / build-appimage (push) Successful in 30s
Build / build-android (push) Successful in 13m4s
Build / build-windows (push) Failing after 1m25s

This commit is contained in:
Zachary Hall 2024-10-20 18:20:48 -07:00
parent 00a6e9cf47
commit 1814ec96e7
2 changed files with 15 additions and 5 deletions

View file

@ -96,6 +96,11 @@ jobs:
path: . path: .
- name: Extract repository code - name: Extract repository code
run: tar -xf source.tar.zst run: tar -xf source.tar.zst
- name: Cache protobuf
uses: actions/cache@v3
with:
key: ${{ hashFiles('./build-protoc.sh', 'subprojects/protobuf' ) }}
path: subprojects/build-protobuf
- name: Build protoc - name: Build protoc
run: ./build-protoc.sh run: ./build-protoc.sh
- name: Setup Java - name: Setup Java
@ -141,10 +146,15 @@ jobs:
path: . path: .
- name: Extract repository code - name: Extract repository code
run: tar -xf source.tar.zst run: tar -xf source.tar.zst
- name: Cache protobuf
uses: actions/cache@v3
with:
key: ${{ hashFiles('./build-protoc.sh', 'subprojects/protobuf' ) }}
path: subprojects/build-protobuf
- name: Build protoc - name: Build protoc
run: ./build-protoc.sh run: ./build-protoc.sh
- name: Build with CMake - name: Build with CMake
run: mkdir -p build-windows && cd build-windows && cmake .. -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-gcc -G Ninja -DDISABLE_GTK_UI=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_LIBFMT=ON -DUSE_PORTALS=OFF -DENABLE_DBUS=OFF -DBUILD_STATIC=ON -DDOWNLOAD_AUDIO_CODECS_DEPENDENCY=ON -DSDL_MIXER_X_SHARED=OFF -DSDL_MIXER_X_STATIC=ON -DUSE_OGG_VORBIS_STB=ON -DUSE_OPUS=OFF -DUSE_MODPLUG=OFF -DUSE_GME=OFF -DUSE_WAVPACK=OFF -DUSE_XMP=OFF -DUSE_MIDI_EDMIDI=OFF -DUSE_SYSTEM_SDL2=OFF -DBUILD_PROTOC=OFF -DBUILD_SDL=ON -DBUILD_SDL_IMAGE=ON -DBUILD_JSONCPP=ON -DBUILD_SOUNDTOUCH=ON -DBUILD_PROTOBUF=ON -DDISABLE_IMGUI_UI=OFF && ninja && cd .. run: mkdir -p build-windows && cd build-windows && cmake .. -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-gcc -G Ninja -DDISABLE_GTK_UI=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_LIBFMT=ON -DUSE_PORTALS=OFF -DENABLE_DBUS=OFF -DBUILD_STATIC=ON -DDOWNLOAD_AUDIO_CODECS_DEPENDENCY=ON -DSDL_MIXER_X_SHARED=OFF -DSDL_MIXER_X_STATIC=ON -DUSE_OGG_VORBIS_STB=ON -DUSE_OPUS=OFF -DUSE_MODPLUG=OFF -DUSE_GME=OFF -DUSE_WAVPACK=OFF -DUSE_XMP=OFF -DUSE_MIDI_EDMIDI=OFF -DUSE_SYSTEM_SDL2=ON -DBUILD_PROTOC=OFF -DBUILD_SDL=ON -DBUILD_SDL_IMAGE=ON -DBUILD_JSONCPP=ON -DBUILD_SOUNDTOUCH=ON -DBUILD_PROTOBUF=ON -DDISABLE_IMGUI_UI=OFF -D BUILD_FMT=ON && ninja && cd ..
- name: Upload artifact - name: Upload artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:

View file

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
pushd subprojects/protobuf pushd subprojects
mkdir -p build-native && cd build-native mkdir -p build-protobuf && cd build-protobuf
cmake .. -G Ninja -DBUILD_TESTS=OFF cmake ../protobuf -G Ninja -DBUILD_TESTS=OFF
ninja #ninja
ninja install ninja install
popd popd