Skip to content

Commit

Permalink
Try to fix linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Dextinfire committed Sep 8, 2024
1 parent b554fae commit 9d6fa84
Show file tree
Hide file tree
Showing 6 changed files with 110 additions and 83 deletions.
31 changes: 18 additions & 13 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ jobs:
triplet: x64-osx-release
env:
VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }}
VCPKG_TARGET_TRIPLET: ${{ matrix.triplet }}
VCPKG_HOST_TRIPLET: ${{ matrix.triplet }}
vcpkgCommitId: '0f88ecb8528605f91980b90a2c5bad88e3cb565f'

steps:
Expand Down Expand Up @@ -65,7 +67,9 @@ jobs:
if: matrix.os =='macos-latest' || matrix.os == 'ubuntu-latest'
run: |-
pushd vendor
git clone https://github.com/Thealexbarney/LibAtrac9.git --depth 1
if [ ! -d "LibAtrac9" ]; then
git clone https://github.com/Thealexbarney/LibAtrac9.git --depth 1
fi
cd LibAtrac9/C
if [ "${{ matrix.os_name }}" == 'macos' ]; then
sed -i '' -e 's/,--version-script=libatrac9.version//g' Makefile
Expand All @@ -76,9 +80,9 @@ jobs:
cp bin/libatrac9.a ../libs/
cp src/libatrac9.h ../include/libatrac9/
popd
echo "LIBATRAC9DIR=vendor/LibAtrac9" >> $GITHUB_ENV
echo "LIBATRAC9DIR=${{ github.workspace }}/vendor/LibAtrac9" >> $GITHUB_ENV
- name: Install Dependencies Linux
run: sudo apt-get install nasm libx11-dev libxft-dev libxext-dev libwayland-dev libxkbcommon-dev libegl1-mesa-dev libibus-1.0-dev libxrandr-dev libvorbis-dev libogg-dev
run: sudo apt-get install nasm libx11-dev libxft-dev libxext-dev libwayland-dev libxkbcommon-dev libegl1-mesa-dev libibus-1.0-dev libxrandr-dev
if: matrix.os_name == 'linux'
- name: Install Dependencies Mac
run: brew install nasm
Expand All @@ -89,6 +93,7 @@ jobs:
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
configurePreset: ci-release
buildPreset: CI-Build
configurePresetAdditionalArgs: "['--debug-find']"

- name: Copy docs
run: |
Expand Down Expand Up @@ -141,11 +146,11 @@ jobs:

- uses: tsickert/[email protected]
with:
channelid: ${{ secrets.discordChannelId }}
webhook-id: ${{ secrets.discordChannelId }}
webhook-url: ${{ secrets.discordWebhookKey }}
name: IMPACTO
avatar: https://cdn.discordapp.com/emojis/766988033127481344.png
embed-title : "${{ github.actor }}"
username: IMPACTO
avatar-url: https://cdn.discordapp.com/emojis/766988033127481344.png
embed-title : "${{ github.event.commits[0].author.name }}"
embed-color: 3659647
embed-timestamp: ${{ env.NOW }}
embed-description: >
Expand All @@ -162,7 +167,7 @@ jobs:
needs:
- job-matrix

if: ${{needs.*.result}} == "failure" || ${{needs.*.result}} == "cancelled"
if: always() && contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
steps:
- uses: actions/checkout@v2
- name: 'Get Jobs Status'
Expand All @@ -172,7 +177,7 @@ jobs:
json_data=$(curl -s -H "Authorization: Bearer ${{ github.token }}" \
"https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs")
name_conclusion_array=($(echo "$json_data" | jq -r '.jobs[] | select(.name | startswith("jobs-matrix")) | "\(.name).\(.conclusion)"'))
name_conclusion_array=($(echo "$json_data" | jq -r '.jobs[] | select(.name | startswith("job-matrix")) | "\(.name).\(.conclusion)"'))
for item in "${name_conclusion_array[@]}"; do
IFS='.' read -r name conclusion <<< "$item"
Expand All @@ -185,11 +190,11 @@ jobs:

- uses: tsickert/[email protected]
with:
channelid: ${{ secrets.discordChannelId }}
webhook-id: ${{ secrets.discordChannelId }}
webhook-url: ${{ secrets.discordWebhookKey }}
name: IMPACTO
avatar: https://cdn.discordapp.com/emojis/766988033127481344.png
embed-title : "${{ github.actor }}"
username: IMPACTO
avatar-url: https://cdn.discordapp.com/emojis/766988033127481344.png
embed-title : "${{ github.event.commits[0].author.name }}"
embed-color: 16711680
embed-timestamp: ${{ steps.date.outputs.NOW }}
embed-description: >
Expand Down
9 changes: 6 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -774,10 +774,12 @@ if (EMSCRIPTEN)
else ()
find_package(SDL2 REQUIRED)
find_package(ZLIB REQUIRED)
find_package(OggVorbis REQUIRED)
find_package(Ogg REQUIRED)
find_package(Vorbis REQUIRED)
find_package(WebP REQUIRED)

include_directories(${OGGVORBIS_INCLUDE_DIRS})
include_directories(${OGG_INCLUDE_DIR})
include_directories(${VORBIS_INCLUDE_DIRS})

if (NX)
list(APPEND Impacto_Libs
Expand Down Expand Up @@ -807,7 +809,8 @@ else ()
list(APPEND Impacto_Libs
${SDL2_LIBRARIES}
ZLIB::ZLIB
${OGGVORBIS_LIBRARIES}
${OGG_LIBRARY}
${VORBIS_LIBRARIES}
${WebP_LIBRARIES}
)

Expand Down
4 changes: 2 additions & 2 deletions CMakePresets.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"version": 8,
"version": 4,
"cmakeMinimumRequired": {
"major": 3,
"minor": 14
"minor": 23
},
"configurePresets": [
{
Expand Down
35 changes: 35 additions & 0 deletions modules/FindOgg.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
set(_LIBOGG_SEARCH
PATHS
~/Library/Frameworks
/Library/Frameworks
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
/usr
/usr/local
)

foreach(search ${_LIBOGG_SEARCH})

find_path(OGG_INCLUDE_DIR ogg/ogg.h
HINTS
ENV OGGDIR
PATH_SUFFIXES include
)

find_library(OGG_LIBRARY
NAMES ogg
HINTS
ENV OGGDIR
PATH_SUFFIXES libx32 lib64 lib libs64 libs
)

endforeach()

unset(_LIBOGG_SEARCH)

include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Ogg DEFAULT_MSG OGG_LIBRARY OGG_INCLUDE_DIR)

mark_as_advanced(OGG_LIBRARY OGG_INCLUDE_DIR)
65 changes: 0 additions & 65 deletions modules/FindOggVorbis.cmake

This file was deleted.

49 changes: 49 additions & 0 deletions modules/FindVorbis.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@

set(_LIBVORBIS_SEARCH
PATHS
~/Library/Frameworks
/Library/Frameworks
/sw # Fink
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
/usr
/usr/local
)

foreach(search ${_LIBVORBIS_SEARCH})

find_path(VORBIS_INCLUDE_DIR vorbis/vorbisfile.h
HINTS
ENV VORBISDIR
PATH_SUFFIXES include

)

find_library(VORBIS_LIBRARY
NAMES vorbis
HINTS
ENV VORBISDIR
PATH_SUFFIXES libx32 lib64 lib libs64 libs
)

find_library(VORBISFILE_LIBRARY
NAMES vorbisfile Vorbis::vorbisFile
HINTS
ENV VORBISDIR
PATH_SUFFIXES libx32 lib64 lib libs64 libs
)

endforeach()

unset(_LIBVORBIS_SEARCH)

set(VORBIS_LIBRARIES
${VORBIS_LIBRARY}
${VORBISFILE_LIBRARY}
)

include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Vorbis DEFAULT_MSG VORBIS_LIBRARIES VORBIS_INCLUDE_DIR)

mark_as_advanced(VORBIS_LIBRARIES VORBIS_INCLUDE_DIR)

0 comments on commit 9d6fa84

Please sign in to comment.