CI: Use libretro core naming convention

This commit is contained in:
Connor McLaughlin 2020-07-05 12:58:04 +10:00
parent 511c3133f1
commit 67bc14dac9
3 changed files with 35 additions and 11 deletions

View file

@ -34,14 +34,16 @@ jobs:
- name: Create libretro core archive - name: Create libretro core archive
shell: cmd shell: cmd
run: | run: |
"C:\Program Files\7-Zip\7z.exe" a -r duckstation-libretro-windows-x64-release.7z ./bin/x64/duckstation-libretro-* rename bin\x64\duckstation-libretro-* duckstation_libretro.dll
del /Q bin\x64\duckstation-libretro-* del /Q bin\x64\duckstation-libretro-*
"C:\Program Files\7-Zip\7z.exe" a -r duckstation_libretro.dll.zip ./bin/x64/duckstation_libretro.dll
del /Q bin\x64\duckstation_libretro.dll
- name: Upload release artifact - name: Upload release artifact
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: "windows-x64" name: "windows-x64"
path: "duckstation-libretro-windows-x64-release.7z" path: "duckstation_libretro.dll.zip"
- name: Create release archive - name: Create release archive
shell: cmd shell: cmd
@ -54,6 +56,7 @@ jobs:
name: "windows-x64" name: "windows-x64"
path: "duckstation-windows-x64-release.7z" path: "duckstation-windows-x64-release.7z"
linux-build: linux-build:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
steps: steps:
@ -100,6 +103,20 @@ jobs:
name: "linux-x64-appimage-qt-zsync" name: "linux-x64-appimage-qt-zsync"
path: "build/duckstation-qt-x64.AppImage.zsync" path: "build/duckstation-qt-x64.AppImage.zsync"
linux-libretro-build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2.3.1
with:
fetch-depth: 0
- name: Install packages
shell: bash
run: |
sudo apt-get update
sudo apt-get -y install cmake ninja-build ccache
- name: Compile libretro core - name: Compile libretro core
shell: bash shell: bash
run: | run: |
@ -112,16 +129,17 @@ jobs:
shell: bash shell: bash
run: | run: |
cd build-libretro cd build-libretro
zip -j duckstation-libretro-linux-x64-release.zip src/duckstation-libretro/libduckstation-libretro.so zip -j duckstation_libretro.so.zip bin/duckstation_libretro.so
- name: Upload Linux libretro core - name: Upload Linux libretro core
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: "linux-x64-libretro" name: "linux-x64-libretro"
path: "build-libretro/duckstation-libretro-linux-x64-release.zip" path: "build-libretro/duckstation_libretro.so.zip"
create-release: create-release:
needs: [windows-build, linux-build] needs: [windows-build, linux-build, linux-libretro-build]
runs-on: "ubuntu-latest" runs-on: "ubuntu-latest"
if: github.ref == 'refs/heads/master' if: github.ref == 'refs/heads/master'
steps: steps:
@ -163,9 +181,9 @@ jobs:
title: "Latest Development Build" title: "Latest Development Build"
files: | files: |
windows-x64/duckstation-windows-x64-release.7z windows-x64/duckstation-windows-x64-release.7z
windows-x64/duckstation-libretro-windows-x64-release.7z windows-x64/duckstation_libretro.dll.zip
linux-x64-appimage-sdl/duckstation-sdl-x64.AppImage linux-x64-appimage-sdl/duckstation-sdl-x64.AppImage
linux-x64-appimage-sdl-zsync/duckstation-sdl-x64.AppImage.zsync linux-x64-appimage-sdl-zsync/duckstation-sdl-x64.AppImage.zsync
linux-x64-appimage-qt/duckstation-qt-x64.AppImage linux-x64-appimage-qt/duckstation-qt-x64.AppImage
linux-x64-appimage-qt-zsync/duckstation-qt-x64.AppImage.zsync linux-x64-appimage-qt-zsync/duckstation-qt-x64.AppImage.zsync
linux-x64-libretro/duckstation-libretro-linux-x64-release.zip linux-x64-libretro/duckstation_libretro.so.zip

View file

@ -168,6 +168,9 @@ else()
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin") set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin")
endif() endif()
# Needed for Linux - put shared libraries in the binary directory.
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
# Enable threads everywhere. # Enable threads everywhere.
set(THREADS_PREFER_PTHREAD_FLAG ON) set(THREADS_PREFER_PTHREAD_FLAG ON)

View file

@ -1,4 +1,4 @@
add_library(duckstation-libretro SHARED add_library(duckstation_libretro SHARED
libretro_audio_stream.cpp libretro_audio_stream.cpp
libretro_audio_stream.h libretro_audio_stream.h
libretro_host_display.cpp libretro_host_display.cpp
@ -15,11 +15,14 @@ add_library(duckstation-libretro SHARED
) )
if(WIN32) if(WIN32)
target_sources(duckstation-libretro PRIVATE target_sources(duckstation_libretro PRIVATE
libretro_d3d11_host_display.cpp libretro_d3d11_host_display.cpp
libretro_d3d11_host_display.h libretro_d3d11_host_display.h
) )
endif() endif()
target_link_libraries(duckstation-libretro PRIVATE core common imgui glad scmversion frontend-common vulkan-loader libretro-common) target_link_libraries(duckstation_libretro PRIVATE core common imgui glad scmversion frontend-common vulkan-loader libretro-common)
# no lib prefix
set_target_properties(duckstation_libretro PROPERTIES PREFIX "")