Skip to content

Commit b90a448

Browse files
committed
Disable non-Linux workflows
1 parent 6776e24 commit b90a448

File tree

1 file changed

+0
-324
lines changed

1 file changed

+0
-324
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 324 deletions
Original file line numberDiff line numberDiff line change
@@ -57,231 +57,6 @@ jobs:
5757
echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
5858
echo "shorthash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
5959
60-
windows-sdl:
61-
runs-on: windows-latest
62-
needs: get-info
63-
steps:
64-
- uses: actions/checkout@v4
65-
with:
66-
submodules: recursive
67-
68-
- name: Cache CMake Configuration
69-
uses: actions/cache@v4
70-
env:
71-
cache-name: ${{ runner.os }}-sdl-ninja-cache-cmake-configuration
72-
with:
73-
path: |
74-
${{github.workspace}}/build
75-
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
76-
restore-keys: |
77-
${{ env.cache-name }}-
78-
79-
- name: Cache CMake Build
80-
uses: hendrikmuhs/[email protected]
81-
env:
82-
cache-name: ${{ runner.os }}-sdl-cache-cmake-build
83-
with:
84-
append-timestamp: false
85-
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
86-
87-
- name: Setup VS Environment
88-
uses: ilammy/[email protected]
89-
with:
90-
arch: amd64
91-
92-
- name: Configure CMake
93-
run: cmake --fresh -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
94-
95-
- name: Build
96-
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel
97-
98-
- name: Upload Windows SDL artifact
99-
uses: actions/upload-artifact@v4
100-
with:
101-
name: shadps4-win64-sdl-${{ needs.get-info.outputs.date }}-${{ needs.get-info.outputs.shorthash }}
102-
path: ${{github.workspace}}/build/shadPS4.exe
103-
104-
windows-qt:
105-
runs-on: windows-latest
106-
needs: get-info
107-
steps:
108-
- uses: actions/checkout@v4
109-
with:
110-
submodules: recursive
111-
112-
- name: Setup Qt
113-
uses: jurplel/install-qt-action@v4
114-
with:
115-
version: 6.7.3
116-
host: windows
117-
target: desktop
118-
arch: win64_msvc2019_64
119-
archives: qtbase qttools
120-
modules: qtmultimedia
121-
122-
- name: Cache CMake Configuration
123-
uses: actions/cache@v4
124-
env:
125-
cache-name: ${{ runner.os }}-qt-ninja-cache-cmake-configuration
126-
with:
127-
path: |
128-
${{github.workspace}}/build
129-
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
130-
restore-keys: |
131-
${{ env.cache-name }}-
132-
133-
- name: Cache CMake Build
134-
uses: hendrikmuhs/[email protected]
135-
env:
136-
cache-name: ${{ runner.os }}-qt-cache-cmake-build
137-
with:
138-
append-timestamp: false
139-
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
140-
141-
- name: Setup VS Environment
142-
uses: ilammy/[email protected]
143-
with:
144-
arch: amd64
145-
146-
- name: Configure CMake
147-
run: cmake --fresh -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_QT_GUI=ON -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
148-
149-
- name: Build
150-
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel
151-
152-
- name: Deploy and Package
153-
run: |
154-
mkdir upload
155-
move build/shadPS4.exe upload
156-
windeployqt --no-compiler-runtime --no-system-d3d-compiler --no-system-dxc-compiler --dir upload upload/shadPS4.exe
157-
Compress-Archive -Path upload/* -DestinationPath shadps4-win64-qt-${{ needs.get-info.outputs.date }}-${{ needs.get-info.outputs.shorthash }}.zip
158-
159-
- name: Upload Windows Qt artifact
160-
uses: actions/upload-artifact@v4
161-
with:
162-
name: shadps4-win64-qt-${{ needs.get-info.outputs.date }}-${{ needs.get-info.outputs.shorthash }}
163-
path: upload/
164-
165-
macos-sdl:
166-
runs-on: macos-latest
167-
needs: get-info
168-
steps:
169-
- uses: actions/checkout@v4
170-
with:
171-
submodules: recursive
172-
173-
- name: Setup latest Xcode
174-
uses: maxim-lobanov/setup-xcode@v1
175-
with:
176-
xcode-version: latest
177-
178-
- name: Install MoltenVK
179-
run: |
180-
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
181-
arch -x86_64 /usr/local/bin/brew install molten-vk
182-
183-
- name: Cache CMake Configuration
184-
uses: actions/cache@v4
185-
env:
186-
cache-name: ${{ runner.os }}-sdl-cache-cmake-configuration
187-
with:
188-
path: |
189-
${{github.workspace}}/build
190-
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
191-
restore-keys: |
192-
${{ env.cache-name }}-
193-
194-
- name: Cache CMake Build
195-
uses: hendrikmuhs/[email protected]
196-
env:
197-
cache-name: ${{runner.os}}-sdl-cache-cmake-build
198-
with:
199-
append-timestamp: false
200-
create-symlink: true
201-
key: ${{env.cache-name}}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
202-
variant: sccache
203-
204-
- name: Configure CMake
205-
run: cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
206-
207-
- name: Build
208-
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $(sysctl -n hw.ncpu)
209-
210-
- name: Package and Upload macOS SDL artifact
211-
run: |
212-
mkdir upload
213-
mv ${{github.workspace}}/build/shadps4 upload
214-
cp $(arch -x86_64 /usr/local/bin/brew --prefix)/opt/molten-vk/lib/libMoltenVK.dylib upload
215-
tar cf shadps4-macos-sdl.tar.gz -C upload .
216-
- uses: actions/upload-artifact@v4
217-
with:
218-
name: shadps4-macos-sdl-${{ needs.get-info.outputs.date }}-${{ needs.get-info.outputs.shorthash }}
219-
path: shadps4-macos-sdl.tar.gz
220-
221-
macos-qt:
222-
runs-on: macos-latest
223-
needs: get-info
224-
steps:
225-
- uses: actions/checkout@v4
226-
with:
227-
submodules: recursive
228-
229-
- name: Setup latest Xcode
230-
uses: maxim-lobanov/setup-xcode@v1
231-
with:
232-
xcode-version: latest
233-
234-
- name: Install MoltenVK and Setup Qt
235-
run: |
236-
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
237-
arch -x86_64 /usr/local/bin/brew install molten-vk
238-
- uses: jurplel/install-qt-action@v4
239-
with:
240-
version: 6.7.3
241-
host: mac
242-
target: desktop
243-
arch: clang_64
244-
archives: qtbase qttools
245-
modules: qtmultimedia
246-
247-
- name: Cache CMake Configuration
248-
uses: actions/cache@v4
249-
env:
250-
cache-name: ${{ runner.os }}-qt-cache-cmake-configuration
251-
with:
252-
path: |
253-
${{github.workspace}}/build
254-
key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
255-
restore-keys: |
256-
${{ env.cache-name }}-
257-
258-
- name: Cache CMake Build
259-
uses: hendrikmuhs/[email protected]
260-
env:
261-
cache-name: ${{runner.os}}-qt-cache-cmake-build
262-
with:
263-
append-timestamp: false
264-
create-symlink: true
265-
key: ${{env.cache-name}}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
266-
variant: sccache
267-
268-
- name: Configure CMake
269-
run: cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_OSX_ARCHITECTURES=x86_64 -DENABLE_QT_GUI=ON -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
270-
271-
- name: Build
272-
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $(sysctl -n hw.ncpu)
273-
274-
- name: Package and Upload macOS Qt artifact
275-
run: |
276-
mkdir upload
277-
mv ${{github.workspace}}/build/shadps4.app upload
278-
macdeployqt upload/shadps4.app
279-
tar cf shadps4-macos-qt.tar.gz -C upload .
280-
- uses: actions/upload-artifact@v4
281-
with:
282-
name: shadps4-macos-qt-${{ needs.get-info.outputs.date }}-${{ needs.get-info.outputs.shorthash }}
283-
path: shadps4-macos-qt.tar.gz
284-
28560
linux-sdl:
28661
runs-on: ubuntu-24.04
28762
needs: get-info
@@ -384,102 +159,3 @@ jobs:
384159
with:
385160
name: shadps4-linux-qt-${{ needs.get-info.outputs.date }}-${{ needs.get-info.outputs.shorthash }}
386161
path: Shadps4-qt.AppImage
387-
388-
pre-release:
389-
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
390-
needs: [get-info, windows-sdl, windows-qt, macos-sdl, macos-qt, linux-sdl, linux-qt]
391-
runs-on: ubuntu-latest
392-
steps:
393-
- name: Download all artifacts
394-
uses: actions/download-artifact@v4
395-
with:
396-
path: ./artifacts
397-
398-
- name: Compress individual directories (without parent directory)
399-
run: |
400-
cd ./artifacts
401-
for dir in */; do
402-
if [ -d "$dir" ]; then
403-
dir_name=${dir%/}
404-
echo "Creating zip for $dir_name"
405-
(cd "$dir_name" && zip -r "../${dir_name}.zip" .)
406-
fi
407-
done
408-
409-
- name: Get latest release information
410-
id: get_latest_release
411-
env:
412-
GITHUB_TOKEN: ${{ secrets.SHADPS4_TOKEN_REPO }}
413-
run: |
414-
api_url="https://api.github.com/repos/${{ github.repository }}"
415-
latest_release_info=$(curl -H "Authorization: token $GITHUB_TOKEN" "$api_url/releases/latest")
416-
echo "last_release_tag=$(echo "$latest_release_info" | jq -r '.tag_name')" >> $GITHUB_ENV
417-
418-
- name: Create Pre-Release on GitHub
419-
id: create_release
420-
uses: ncipollo/release-action@v1
421-
with:
422-
token: ${{ secrets.SHADPS4_TOKEN_REPO }}
423-
name: "Pre-release-shadPS4-${{ needs.get-info.outputs.date }}-${{ needs.get-info.outputs.shorthash }}"
424-
tag: "Pre-release-shadPS4-${{ needs.get-info.outputs.date }}-${{ needs.get-info.outputs.shorthash }}"
425-
draft: false
426-
prerelease: true
427-
body: "Full Changelog: [${{ env.last_release_tag }}...${{ needs.get-info.outputs.shorthash }}](https://github.com/shadps4-emu/shadPS4/compare/${{ env.last_release_tag }}...${{ needs.get-info.outputs.shorthash }})"
428-
artifacts: ./artifacts/*.zip
429-
430-
- name: Get current pre-release information
431-
env:
432-
GITHUB_TOKEN: ${{ secrets.SHADPS4_TOKEN_REPO }}
433-
run: |
434-
api_url="https://api.github.com/repos/${{ github.repository }}/releases"
435-
436-
# Get all releases (sorted by date)
437-
releases=$(curl -H "Authorization: token $GITHUB_TOKEN" "$api_url")
438-
439-
# Capture the most recent pre-release (assuming the first one is the latest)
440-
current_release=$(echo "$releases" | jq -c '.[] | select(.prerelease == true) | .published_at' | sort -r | head -n 1)
441-
442-
# Remove extra quotes from captured date
443-
current_release=$(echo $current_release | tr -d '"')
444-
445-
# Export the current published_at to be available for the next step
446-
echo "CURRENT_PUBLISHED_AT=$current_release" >> $GITHUB_ENV
447-
448-
- name: Delete old pre-releases and tags
449-
env:
450-
GITHUB_TOKEN: ${{ secrets.SHADPS4_TOKEN_REPO }}
451-
run: |
452-
api_url="https://api.github.com/repos/${{ github.repository }}/releases"
453-
454-
# Get current pre-releases
455-
releases=$(curl -H "Authorization: token $GITHUB_TOKEN" "$api_url")
456-
457-
# Remove extra quotes from captured date
458-
CURRENT_PUBLISHED_AT=$(echo $CURRENT_PUBLISHED_AT | tr -d '"')
459-
460-
# Convert CURRENT_PUBLISHED_AT para timestamp Unix
461-
current_published_ts=$(date -d "$CURRENT_PUBLISHED_AT" +%s)
462-
463-
# Identify pre-releases
464-
echo "$releases" | jq -c '.[] | select(.prerelease == true)' | while read -r release; do
465-
release_date=$(echo "$release" | jq -r '.published_at')
466-
release_id=$(echo "$release" | jq -r '.id')
467-
release_tag=$(echo "$release" | jq -r '.tag_name')
468-
469-
# Remove extra quotes from captured date
470-
release_date=$(echo $release_date | tr -d '"')
471-
472-
# Convert release_date para timestamp Unix
473-
release_date_ts=$(date -d "$release_date" +%s)
474-
475-
# Compare timestamps and delete old pre-releases
476-
if [[ "$release_date_ts" -lt "$current_published_ts" ]]; then
477-
echo "Deleting old pre-release: $release_id from $release_date with tag: $release_tag"
478-
# Delete the pre-release
479-
curl -X DELETE -H "Authorization: token $GITHUB_TOKEN" "$api_url/$release_id"
480-
# Delete the tag
481-
curl -X DELETE -H "Authorization: token $GITHUB_TOKEN" "https://api.github.com/repos/${{ github.repository }}/git/refs/tags/$release_tag"
482-
else
483-
echo "Skipping pre-release: $release_id (newer or same date)"
484-
fi
485-
done

0 commit comments

Comments
 (0)