Skip to content

Commit

Permalink
Remove build libatrac from pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Dextinfire committed Dec 26, 2024
1 parent 04fd3df commit 870c4bd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 80 deletions.
32 changes: 1 addition & 31 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,6 @@ jobs:
file: devkitpro.tgz
out: /opt
token: ${{ secrets.SWITCH_BUILD_TOKEN }}

- name: Cache LibAtrac9
if: matrix.os_name != 'switch'
uses: actions/cache@v3
with:
key: libatrac9 | ${{ matrix.os_name }}
path: vendor/LibAtrac9

- uses: lukka/get-cmake@latest
- name: Setup vcpkg
Expand All @@ -140,30 +133,7 @@ jobs:
run: |
./build-deps.ps1 -Arg1 x64
shell: pwsh
- name: Setup Dependencies Linux/MacOS/Android
if: contains(matrix.os_name, 'macos') || contains(matrix.os_name, 'linux') || contains(matrix.os_name, 'android')
run: |-
pushd vendor
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
fi
if [ -z "${CC}" ]; then
make
else
make CC="$CC"
fi
mkdir -p ../include/libatrac9
mkdir -p ../libs
cp bin/libatrac9.* ../libs/
cp src/libatrac9.h ../include/libatrac9/
popd
echo "LIBATRAC9DIR=${{ github.workspace }}/vendor/LibAtrac9" >> $GITHUB_ENV
find "${{ github.workspace }}/vendor/LibAtrac9"

- 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
if: matrix.os_name == 'linux' || matrix.os_name == 'android'
Expand Down
49 changes: 0 additions & 49 deletions build-deps.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,54 +13,6 @@ function SetEnv() {
}
}

function BuildLibatrac9() {
echo "Starting LibAtrac9 Build..."
if (!(Get-Command msbuild -ErrorAction SilentlyContinue)) {
SetEnv
}


pushd "vendor"
$repo_root = "LibAtrac9"
$libatrac9_exists = Test-Path $repo_root
if (-not $libatrac9_exists) {
echo "Cloning LibAtrac9..."
& git clone https://github.com/Thealexbarney/LibAtrac9.git --depth 1
}
pushd $repo_root
pushd "C"
if ($env:AZURE_EXTENSION_DIR -eq $null -or -not $libatrac9_exists) {
echo "Upgrading LibAtrac9 project..."
& devenv /Upgrade libatrac9.sln
}

$args = @(
"/m",
"/p:Configuration=Release",
"/p:Platform=$Arch",
"/p:WindowsTargetPlatformVersion=10.0",
"/p:PlatformToolset=v142"
)
echo "Building LibAtrac9..."
& msbuild $args
popd

echo "Copying LibAtrac9 dlls and headers..."
$includedir = "include/libatrac9"
mkdir $includedir -Force | Out-Null
Get-ChildItem -Path "./C/src/*" -Include *.h | Copy-Item -Destination $includedir
mkdir "bin/x86" -Force | Out-Null
mkdir "bin/x64" -Force | Out-Null
if(Test-Path "./C/Release") {
Get-ChildItem -Path "./C/Release/*" -Include *.dll,*.lib | Copy-Item -Destination "bin/x86"
}
if(Test-Path "./C/x64/Release") {
Get-ChildItem -Path "./C/x64/Release/*" -Include *.dll,*.lib | Copy-Item -Destination "bin/x64"
}
popd
popd
}

function InstallPackages() {
$vcpkg = "$env:VCPKG_ROOT/vcpkg.exe"
if (!(Get-Command $vcpkg -ErrorAction SilentlyContinue)) {
Expand Down Expand Up @@ -91,5 +43,4 @@ function InstallPackages() {
}
}

BuildLibatrac9
InstallPackages

0 comments on commit 870c4bd

Please sign in to comment.