Skip to content

Commit cdf6d5b

Browse files
committed
CI: Use prebuilt dependencies
Decouple from the repository. Less CI time, and faster building of older commits.
1 parent 19b618d commit cdf6d5b

File tree

75 files changed

+303
-5317
lines changed

Some content is hidden

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

75 files changed

+303
-5317
lines changed

.github/workflows/linux-appimage-build.yml

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,20 @@ jobs:
3131
- name: Install Packages
3232
run: scripts/appimage/install-packages.sh
3333

34-
- name: Cache Dependencies
35-
id: cache-deps
36-
uses: actions/cache@v5
37-
with:
38-
path: ~/deps
39-
key: deps ${{ hashFiles('scripts/deps/build-dependencies-linux.sh', 'scripts/deps/build-ffmpeg-linux.sh', 'scripts/deps/versions') }}
40-
41-
- name: Build Dependencies
42-
if: steps.cache-deps.outputs.cache-hit != 'true'
43-
run: scripts/deps/build-dependencies-linux.sh "$HOME/deps"
34+
- name: Download Dependencies
35+
run: |
36+
DEPS_VERSION=$(cat dep/PREBUILT-VERSION)
37+
cd dep/prebuilt
38+
curl --retry 5 --retry-all-errors -LO "https://github.com/duckstation/dependencies/releases/download/$DEPS_VERSION/deps-linux-x64.tar.xz"
39+
tar -xf "deps-linux-x64.tar.xz"
40+
rm "deps-linux-x64.tar.xz"
4441
45-
- name: Build FFmpeg
46-
if: steps.cache-deps.outputs.cache-hit != 'true'
47-
run: scripts/deps/build-ffmpeg-linux.sh "$HOME/deps"
42+
- name: Download Patch Archives
43+
shell: bash
44+
run: |
45+
cd data/resources
46+
curl --retry 5 --retry-all-errors -LO "https://github.com/duckstation/chtdb/releases/download/latest/cheats.zip"
47+
curl --retry 5 --retry-all-errors -LO "https://github.com/duckstation/chtdb/releases/download/latest/patches.zip"
4848
4949
- name: Tag as Preview Release
5050
if: github.ref == 'refs/heads/master'
@@ -60,22 +60,15 @@ jobs:
6060
echo '#define UPDATER_RELEASE_CHANNEL "latest"' >> src/scmversion/tag.h
6161
echo '#define UPDATER_RELEASE_IS_OFFICIAL 1' >> src/scmversion/tag.h
6262
63-
- name: Download Patch Archives
64-
shell: bash
65-
run: |
66-
cd data/resources
67-
curl --retry 5 --retry-all-errors -LO "https://github.com/duckstation/chtdb/releases/download/latest/cheats.zip"
68-
curl --retry 5 --retry-all-errors -LO "https://github.com/duckstation/chtdb/releases/download/latest/patches.zip"
69-
7063
- name: Compile Build
7164
shell: bash
7265
run: |
7366
mkdir build
7467
cd build
75-
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ${{ matrix.cmakeoptions }} -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_PREFIX_PATH="$HOME/deps" -DCMAKE_C_COMPILER=clang-19 -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_EXE_LINKER_FLAGS_INIT="-fuse-ld=lld" -DCMAKE_MODULE_LINKER_FLAGS_INIT="-fuse-ld=lld" -DCMAKE_SHARED_LINKER_FLAGS_INIT="-fuse-ld=lld" ..
68+
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ${{ matrix.cmakeoptions }} -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_C_COMPILER=clang-19 -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_EXE_LINKER_FLAGS_INIT="-fuse-ld=lld" -DCMAKE_MODULE_LINKER_FLAGS_INIT="-fuse-ld=lld" -DCMAKE_SHARED_LINKER_FLAGS_INIT="-fuse-ld=lld" ..
7669
cmake --build . --parallel
7770
cd ..
78-
scripts/appimage/make-appimage.sh $(realpath .) $(realpath ./build) $HOME/deps "${{ matrix.asset }}"
71+
scripts/appimage/make-appimage.sh $(realpath .) $(realpath ./build) "${{ matrix.asset }}"
7972
8073
- name: Upload AppImage
8174
uses: actions/upload-artifact@v6

.github/workflows/linux-cross-appimage-build.yml

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,22 @@ jobs:
2525
with:
2626
fetch-depth: 0
2727

28-
- name: Cache Dependencies
29-
id: cache-deps
30-
uses: actions/cache@v5
31-
with:
32-
path: ~/deps
33-
key: deps-cross ${{ matrix.arch }} ${{ hashFiles('scripts/deps/build-dependencies-linux.sh', 'scripts/deps/build-dependencies-linux-cross.sh', 'scripts/deps/versions') }}
28+
- name: Download Dependencies
29+
run: |
30+
DEPS_VERSION=$(cat dep/PREBUILT-VERSION)
31+
cd dep/prebuilt
32+
curl --retry 5 --retry-all-errors -LO "https://github.com/duckstation/dependencies/releases/download/$DEPS_VERSION/deps-linux-x64.tar.xz"
33+
curl --retry 5 --retry-all-errors -LO "https://github.com/duckstation/dependencies/releases/download/$DEPS_VERSION/deps-linux-cross-${{matrix.arch}}.tar.xz"
34+
tar -xf "deps-linux-x64.tar.xz"
35+
tar -xf "deps-linux-cross-${{matrix.arch}}.tar.xz"
36+
rm "deps-linux-x64.tar.xz" "deps-linux-cross-${{matrix.arch}}.tar.xz"
3437
35-
- name: Build Dependencies
36-
if: steps.cache-deps.outputs.cache-hit != 'true'
38+
- name: Download Patch Archives
39+
shell: bash
3740
run: |
38-
scripts/deps/build-dependencies-linux.sh -skip-cleanup "$HOME/deps/host"
39-
scripts/deps/build-dependencies-linux-cross.sh -skip-download "$HOME/deps/host" "${{ matrix.arch }}" "/${{ matrix.arch }}-chroot" "$HOME/deps/cross"
41+
cd data/resources
42+
curl --retry 5 --retry-all-errors -LO "https://github.com/duckstation/chtdb/releases/download/latest/cheats.zip"
43+
curl --retry 5 --retry-all-errors -LO "https://github.com/duckstation/chtdb/releases/download/latest/patches.zip"
4044
4145
# Work around container ownership issue
4246
- name: Set Safe Directory
@@ -49,16 +53,19 @@ jobs:
4953
5054
- name: Set Up Toolchain File
5155
run: |
52-
cp "$HOME/deps/cross/toolchain.cmake" "$HOME/toolchain.cmake"
53-
echo 'set(CMAKE_C_COMPILER clang-19)' >> "$HOME/toolchain.cmake"
54-
echo 'set(CMAKE_C_COMPILER_AR llvm-ar-19)' >> "$HOME/toolchain.cmake"
55-
echo 'set(CMAKE_C_COMPILER_RANLIB llvm-ranlib-19)' >> "$HOME/toolchain.cmake"
56-
echo 'set(CMAKE_CXX_COMPILER clang++-19)' >> "$HOME/toolchain.cmake"
57-
echo 'set(CMAKE_CXX_COMPILER_AR llvm-ar-19)' >> "$HOME/toolchain.cmake"
58-
echo 'set(CMAKE_CXX_COMPILER_RANLIB llvm-ranlib-19)' >> "$HOME/toolchain.cmake"
59-
echo 'set(CMAKE_EXE_LINKER_FLAGS_INIT "-fuse-ld=lld")' >> "$HOME/toolchain.cmake"
60-
echo 'set(CMAKE_MODULE_LINKER_FLAGS_INIT "-fuse-ld=lld")' >> "$HOME/toolchain.cmake"
61-
echo 'set(CMAKE_SHARED_LINKER_FLAGS_INIT "-fuse-ld=lld")' >> "$HOME/toolchain.cmake"
56+
cp "dep/prebuilt/linux-cross-${{matrix.arch}}/toolchain.cmake" "$HOME/toolchain.cmake"
57+
echo "set(CMAKE_FIND_ROOT_PATH \"$PWD/dep/prebuilt/linux-cross-${{matrix.arch}};/${{matrix.arch}}-chroot\")" >> "$HOME/toolchain.cmake"
58+
echo "set(QT_HOST_PATH \"$PWD/dep/prebuilt/linux-x64\")" >> "$HOME/toolchain.cmake"
59+
echo "set(LCONVERT_EXE \"$PWD/dep/prebuilt/linux-x64/bin/lconvert\")" >> "$HOME/toolchain.cmake"
60+
echo "set(CMAKE_C_COMPILER clang-19)" >> "$HOME/toolchain.cmake"
61+
echo "set(CMAKE_C_COMPILER_AR llvm-ar-19)" >> "$HOME/toolchain.cmake"
62+
echo "set(CMAKE_C_COMPILER_RANLIB llvm-ranlib-19)" >> "$HOME/toolchain.cmake"
63+
echo "set(CMAKE_CXX_COMPILER clang++-19)" >> "$HOME/toolchain.cmake"
64+
echo "set(CMAKE_CXX_COMPILER_AR llvm-ar-19)" >> "$HOME/toolchain.cmake"
65+
echo "set(CMAKE_CXX_COMPILER_RANLIB llvm-ranlib-19)" >> "$HOME/toolchain.cmake"
66+
echo "set(CMAKE_EXE_LINKER_FLAGS_INIT "-fuse-ld=lld")" >> "$HOME/toolchain.cmake"
67+
echo "set(CMAKE_MODULE_LINKER_FLAGS_INIT "-fuse-ld=lld")" >> "$HOME/toolchain.cmake"
68+
echo "set(CMAKE_SHARED_LINKER_FLAGS_INIT "-fuse-ld=lld")" >> "$HOME/toolchain.cmake"
6269
6370
- name: Tag as Preview Release
6471
if: github.ref == 'refs/heads/master'
@@ -74,24 +81,17 @@ jobs:
7481
echo '#define UPDATER_RELEASE_CHANNEL "latest"' >> src/scmversion/tag.h
7582
echo '#define UPDATER_RELEASE_IS_OFFICIAL 1' >> src/scmversion/tag.h
7683
77-
- name: Download Patch Archives
78-
shell: bash
79-
run: |
80-
cd data/resources
81-
curl --retry 5 --retry-all-errors -LO "https://github.com/duckstation/chtdb/releases/download/latest/cheats.zip"
82-
curl --retry 5 --retry-all-errors -LO "https://github.com/duckstation/chtdb/releases/download/latest/patches.zip"
83-
8484
- name: Generate CMake
8585
shell: bash
8686
run: |
87-
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_TOOLCHAIN_FILE="$HOME/toolchain.cmake" -DCMAKE_PREFIX_PATH="$HOME/deps/cross" -DLCONVERT_EXE="$HOME/deps/host/bin/lconvert" -DHOST_MIN_PAGE_SIZE=4096 -DHOST_MAX_PAGE_SIZE=16384 -DHOST_CACHE_LINE_SIZE=64 -DBUILD_QT_FRONTEND=ON -DBUILD_MINI_FRONTEND=ON
87+
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_TOOLCHAIN_FILE="$HOME/toolchain.cmake" -DHOST_MIN_PAGE_SIZE=4096 -DHOST_MAX_PAGE_SIZE=16384 -DHOST_CACHE_LINE_SIZE=64 -DBUILD_QT_FRONTEND=ON -DBUILD_MINI_FRONTEND=ON
8888
8989
- name: Compile Build
9090
shell: bash
9191
run: |
9292
cmake --build build --parallel
93-
scripts/appimage/make-cross-appimage.sh duckstation-qt ${{ matrix.arch }} "$(realpath build)" "$HOME/deps/cross" "/${{ matrix.arch }}-chroot"
94-
scripts/appimage/make-cross-appimage.sh -inject-libc duckstation-mini ${{ matrix.arch }} "$(realpath build)" "$HOME/deps/cross" "/${{ matrix.arch }}-chroot"
93+
scripts/appimage/make-cross-appimage.sh duckstation-qt ${{ matrix.arch }} "$(realpath build)" "/${{ matrix.arch }}-chroot"
94+
scripts/appimage/make-cross-appimage.sh -inject-libc duckstation-mini ${{ matrix.arch }} "$(realpath build)" "/${{ matrix.arch }}-chroot"
9595
9696
- name: Upload AppImages
9797
uses: actions/upload-artifact@v6

.github/workflows/macos-build.yml

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,20 @@ jobs:
2323
- name: Download Metal Toolchain
2424
run: xcodebuild -downloadComponent MetalToolchain
2525

26-
- name: Cache Dependencies
27-
id: cache-deps-mac
28-
uses: actions/cache@v5
29-
with:
30-
path: ~/deps
31-
key: deps-mac ${{ hashFiles('scripts/deps/build-dependencies-mac.sh', 'scripts/deps/versions') }}
26+
- name: Download Dependencies
27+
run: |
28+
DEPS_VERSION=$(cat dep/PREBUILT-VERSION)
29+
cd dep/prebuilt
30+
curl --retry 5 --retry-all-errors -LO "https://github.com/duckstation/dependencies/releases/download/$DEPS_VERSION/deps-macos-universal.tar.xz"
31+
tar -xf "deps-macos-universal.tar.xz"
32+
rm "deps-macos-universal.tar.xz"
3233
33-
- name: Build Dependencies
34-
if: steps.cache-deps-mac.outputs.cache-hit != 'true'
35-
run: scripts/deps/build-dependencies-mac.sh "$HOME/deps"
34+
- name: Download Patch Archives
35+
shell: bash
36+
run: |
37+
cd data/resources
38+
curl --retry 5 --retry-all-errors -LO "https://github.com/duckstation/chtdb/releases/download/latest/cheats.zip"
39+
curl --retry 5 --retry-all-errors -LO "https://github.com/duckstation/chtdb/releases/download/latest/patches.zip"
3640
3741
- name: Tag as Preview Release
3842
if: github.ref == 'refs/heads/master'
@@ -48,13 +52,6 @@ jobs:
4852
echo '#define UPDATER_RELEASE_CHANNEL "latest"' >> src/scmversion/tag.h
4953
echo '#define UPDATER_RELEASE_IS_OFFICIAL 1' >> src/scmversion/tag.h
5054
51-
- name: Download Patch Archives
52-
shell: bash
53-
run: |
54-
cd data/resources
55-
curl --retry 5 --retry-all-errors -LO "https://github.com/duckstation/chtdb/releases/download/latest/cheats.zip"
56-
curl --retry 5 --retry-all-errors -LO "https://github.com/duckstation/chtdb/releases/download/latest/patches.zip"
57-
5855
- name: Compile and Zip .app
5956
shell: bash
6057
run: |

.github/workflows/upload-caches.yml

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

.github/workflows/windows-build.yml

Lines changed: 21 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -53,26 +53,27 @@ jobs:
5353
with:
5454
fetch-depth: 0
5555

56-
- name: Cache Dependencies
57-
id: cache-deps
58-
uses: actions/cache@v5
59-
with:
60-
path: |
61-
dep/msvc/deps-arm64
62-
dep/msvc/deps-x64
63-
key: deps ${{ hashFiles('scripts/deps/build-dependencies-windows-arm64.bat', 'scripts/deps/build-dependencies-windows-x64.bat', 'scripts/deps/versions') }}
64-
65-
- name: Build x64 Dependencies
66-
if: steps.cache-deps.outputs.cache-hit != 'true'
67-
env:
68-
DEBUG: 0
69-
run: scripts/deps/build-dependencies-windows-x64.bat
70-
71-
- name: Build ARM64 Dependencies
72-
if: steps.cache-deps.outputs.cache-hit != 'true'
73-
env:
74-
DEBUG: 0
75-
run: scripts/deps/build-dependencies-windows-arm64.bat
56+
- name: Download x64 Dependencies
57+
shell: cmd
58+
run: |
59+
set /p DEPS_VERSION=<dep\PREBUILT-VERSION
60+
curl --retry 5 --retry-all-errors -LO "https://github.com/duckstation/dependencies/releases/download/%DEPS_VERSION%/deps-windows-x64.7z"
61+
"C:\Program Files\7-Zip\7z.exe" x -odep\prebuilt deps-windows-x64.7z
62+
63+
- name: Download ARM64 Dependencies
64+
shell: cmd
65+
if: matrix.arch == 'arm64'
66+
run: |
67+
set /p DEPS_VERSION=<dep\PREBUILT-VERSION
68+
curl --retry 5 --retry-all-errors -LO "https://github.com/duckstation/dependencies/releases/download/%DEPS_VERSION%/deps-windows-arm64.7z"
69+
"C:\Program Files\7-Zip\7z.exe" x -odep\prebuilt deps-windows-arm64.7z
70+
71+
- name: Download Patch Archives
72+
shell: cmd
73+
run: |
74+
cd data/resources
75+
curl --retry 5 --retry-all-errors -LO "https://github.com/duckstation/chtdb/releases/download/latest/cheats.zip"
76+
curl --retry 5 --retry-all-errors -LO "https://github.com/duckstation/chtdb/releases/download/latest/patches.zip"
7677
7778
- name: Tag as Preview Release
7879
if: github.ref == 'refs/heads/master'
@@ -98,13 +99,6 @@ jobs:
9899
cd ..\..
99100
git update-index --assume-unchanged src/duckstation-qt/duckstation-qt.rc
100101
101-
- name: Download Patch Archives
102-
shell: cmd
103-
run: |
104-
cd data/resources
105-
curl --retry 5 --retry-all-errors -LO "https://github.com/duckstation/chtdb/releases/download/latest/cheats.zip"
106-
curl --retry 5 --retry-all-errors -LO "https://github.com/duckstation/chtdb/releases/download/latest/patches.zip"
107-
108102
- name: Compile ${{ matrix.name }} Release Build
109103
shell: cmd
110104
run: |

0 commit comments

Comments
 (0)