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
shell: cmd
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-*
"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
uses: actions/upload-artifact@v1
with:
name: "windows-x64"
path: "duckstation-libretro-windows-x64-release.7z"
path: "duckstation_libretro.dll.zip"
- name: Create release archive
shell: cmd
@ -54,6 +56,7 @@ jobs:
name: "windows-x64"
path: "duckstation-windows-x64-release.7z"
linux-build:
runs-on: ubuntu-20.04
steps:
@ -100,6 +103,20 @@ jobs:
name: "linux-x64-appimage-qt-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
shell: bash
run: |
@ -112,16 +129,17 @@ jobs:
shell: bash
run: |
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
uses: actions/upload-artifact@v1
with:
name: "linux-x64-libretro"
path: "build-libretro/duckstation-libretro-linux-x64-release.zip"
path: "build-libretro/duckstation_libretro.so.zip"
create-release:
needs: [windows-build, linux-build]
needs: [windows-build, linux-build, linux-libretro-build]
runs-on: "ubuntu-latest"
if: github.ref == 'refs/heads/master'
steps:
@ -163,9 +181,9 @@ jobs:
title: "Latest Development Build"
files: |
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-zsync/duckstation-sdl-x64.AppImage.zsync
linux-x64-appimage-qt/duckstation-qt-x64.AppImage
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")
endif()
# Needed for Linux - put shared libraries in the binary directory.
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
# Enable threads everywhere.
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.h
libretro_host_display.cpp
@ -15,11 +15,14 @@ add_library(duckstation-libretro SHARED
)
if(WIN32)
target_sources(duckstation-libretro PRIVATE
target_sources(duckstation_libretro PRIVATE
libretro_d3d11_host_display.cpp
libretro_d3d11_host_display.h
)
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 "")