From 21e9a095dfaae20b2232ae566026cc7013517eac Mon Sep 17 00:00:00 2001 From: Ion Agorria Date: Wed, 31 Jan 2024 17:35:48 +0100 Subject: [PATCH] tmp --- .github/workflows/macos_build.yml | 123 -------------------- .github/workflows/nix_build.yml | 54 --------- .github/workflows/windows_msvc_build.yml | 73 ------------ .github/workflows/windows_msys_build.yml | 140 ----------------------- 4 files changed, 390 deletions(-) delete mode 100644 .github/workflows/macos_build.yml delete mode 100644 .github/workflows/nix_build.yml delete mode 100644 .github/workflows/windows_msvc_build.yml delete mode 100644 .github/workflows/windows_msys_build.yml diff --git a/.github/workflows/macos_build.yml b/.github/workflows/macos_build.yml deleted file mode 100644 index 1ca4ce228..000000000 --- a/.github/workflows/macos_build.yml +++ /dev/null @@ -1,123 +0,0 @@ -name: MacOS Build - -on: - push: - pull_request: - types: - - opened - - reopened - - synchronize - - ready_for_review - -env: - VULKAN_SDK_VERSION: '1.3.250.1' - VULKAN_LIB_VERSION: '1.3.250' - MACOSX_DEPLOYMENT_TARGET: '10.15' - GH_CACHE_KEY: 9 - -jobs: - build: - if: github.event.pull_request.draft == false - strategy: - fail-fast: false - matrix: - env: [ - {build_type: Debug, cmake: "-DOPTION_SOKOL=ON"}, - {build_type: Release, cmake: ""} - ] - name: ${{matrix.env.build_type}} - runs-on: macos-latest - steps: - - uses: actions/checkout@v3 - - name: install libs - run: | - brew install ninja yasm dylibbundler \ - libogg libvorbis libvpx boost meson cmake zlib \ - sdl2 sdl2_image sdl2_mixer sdl2_net - - uses: actions/cache@v3 - id: cache - with: - path: | - vulkansdk-macos.dmg - ffmpeg - key: MacOS-${{ env.VULKAN_SDK_VERSION }}-${{ env.GH_CACHE_KEY }} - - name: download Vulkan SDK - if: steps.cache.outputs.cache-hit != 'true' - run: | - wget https://sdk.lunarg.com/sdk/download/${{ env.VULKAN_SDK_VERSION }}/mac/vulkansdk-macos-${{ env.VULKAN_SDK_VERSION }}.dmg?Human=true -O vulkansdk-macos.dmg - - name: install Vulkan SDK - run: | - hdiutil attach vulkansdk-macos.dmg - sudo /Volumes/VulkanSDK/InstallVulkan.app/Contents/MacOS/InstallVulkan --root ~/VulkanSDK --accept-licenses --default-answer --confirm-command install - sync - cd ~/VulkanSDK/ - sudo ./install_vulkan.py - sleep 10 - hdiutil detach /Volumes/VulkanSDK - - name: ffmpeg -- download - if: steps.cache.outputs.cache-hit != 'true' - run: git clone --depth 1 --branch n5.1 https://git.ffmpeg.org/ffmpeg.git ffmpeg - - name: ffmpeg -- configure - if: steps.cache.outputs.cache-hit != 'true' - run: ./configure - --prefix=/usr/local - --enable-shared --disable-static - --cc="clang" - --arch=${{matrix.env.arch}} - --extra-cflags="-arch x86_64" - --extra-ldflags="-arch x86_64" - --target-os=darwin - --sysroot=$(xcrun --sdk macosx --show-sdk-path) - --disable-everything - --enable-swscale - --enable-swresample - --enable-zlib - --enable-libvpx - --enable-libvorbis - --enable-demuxer=avi,rawvideo,bink,matroska - --enable-decoder=png,rawvideo,bink,binkaudio_dct,vorbis,opus,vp8,vp9 - --enable-parser=png,vp9 - --enable-filter=aresample,aformat - --enable-protocol=file - --disable-d3d11va - --disable-dxva2 - --disable-vulkan - --disable-network - --disable-doc --disable-ffplay --disable-ffprobe --disable-ffmpeg - --disable-bzlib --disable-libopenjpeg --disable-iconv - working-directory: ffmpeg - - name: ffmpeg -- build - if: steps.cache.outputs.cache-hit != 'true' - run: make -j4 - working-directory: ffmpeg - - name: ffmpeg -- install - run: sudo make install - working-directory: ffmpeg - - name: perimeter -- create build dir - run: mkdir build - - name: perimeter -- configure - run: cmake .. -G Ninja -DCMAKE_BUILD_TYPE=${{matrix.env.build_type}} -DOPTION_D3D9=ON ${{matrix.env.cmake}} - working-directory: build - - name: perimeter -- build dependencies - run: ninja dependencies - working-directory: build - - name: perimeter -- build project - run: ninja - working-directory: build - - name: perimeter -- strip binary - run: strip -x Source/Perimeter - working-directory: build - - name: perimeter -- package app - run: macos/package.sh - env: - TEMPLATE_DIR: "macos/Perimeter.app.template" - BUILD_DIR: "build" - APP_DIR: "Perimeter.app" - LIB_DIR: "/usr/local/lib" - - name: perimeter -- release tar - run: tar -cvf Perimeter.app.tar Perimeter.app - #TODO Expose artifacts once we build universal binaries - #- uses: actions/upload-artifact@v3 - # with: - # name: Perimeter MacOS ${{matrix.env.build_type}} - # path: Perimeter.app.tar \ No newline at end of file diff --git a/.github/workflows/nix_build.yml b/.github/workflows/nix_build.yml deleted file mode 100644 index 2a916569e..000000000 --- a/.github/workflows/nix_build.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: Nix Build - -on: - push: - pull_request: - types: - - opened - - reopened - - synchronize - - ready_for_review - -env: - GH_CACHE_KEY: 1 - - -jobs: -# build: -# if: github.event.pull_request.draft == false -# strategy: -# fail-fast: false -# matrix: -# target: [ -# #{ pkg: "aarch64-darwin", on: "macos-latest" }, -# #{ pkg: "x86_64-darwin", on: "macos-latest" }, -# { pkg: "x86_64-linux", on: "ubuntu-latest" }, -# #{ pkg: "aarch64-linux", on: "ubuntu-latest" }, -# ] -# env: [ -# {name: "Release", flake: ""}, -# {name: "Debug", flake: "_debug"}, -# ] -# name: ${{matrix.target.pkg}} ${{matrix.env.name}} -# runs-on: ${{matrix.target.on}} -# steps: -# - uses: actions/checkout@v3 -# - uses: actions/cache@v3 -# id: cache -# with: -# path: /nix/store -# key: NIX-${{matrix.target.pkg}}-${{matrix.env.name}}-${{ env.GH_CACHE_KEY }} -# - uses: cachix/install-nix-action@v20 -# with: -# github_access_token: ${{ secrets.GITHUB_TOKEN }} -# - run: nix build ".#platform_${{matrix.target.pkg}}${{matrix.env.flake}}" - check: - if: github.event.pull_request.draft == false - name: Check - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: cachix/install-nix-action@v20 - with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} - - run: nix flake check diff --git a/.github/workflows/windows_msvc_build.yml b/.github/workflows/windows_msvc_build.yml deleted file mode 100644 index 8e23880f2..000000000 --- a/.github/workflows/windows_msvc_build.yml +++ /dev/null @@ -1,73 +0,0 @@ -name: Windows MSVC Build - -on: - push: - pull_request: - types: - - opened - - reopened - - synchronize - - ready_for_review - -env: - VCPKG_COMMIT_ID: '21bbb14c4113b89cd06402e852e075341722304f' - buildDir: '${{ github.workspace }}/build/' - outDir: '${{ github.workspace }}/artifact/' - -jobs: - build: - if: github.event.pull_request.draft == false - strategy: - matrix: - env: [ - #{bits: 32, arch_installed: x86, build_type: Debug, arch_name: x86, arch: x86}, - {bits: 64, arch_installed: x64, build_type: Debug, arch_name: x86, arch: amd64}, - #{bits: 64, arch_installed: x64, build_type: Debug, arch_name: ARM, arch: amd64_arm64}, - {bits: 32, arch_installed: x86, build_type: Release, arch_name: x86, arch: x86}, - {bits: 64, arch_installed: x64, build_type: Release, arch_name: x86, arch: amd64}, - #{bits: 64, arch_installed: x64, build_type: Release, arch_name: ARM, arch: amd64_arm64} - ] - name: ${{matrix.env.build_type}} ${{matrix.env.arch_name}} ${{matrix.env.bits}} bits - env: - VCPKG_DEFAULT_TRIPLET: ${{matrix.env.arch}}-windows - runs-on: windows-latest - steps: - - uses: actions/checkout@v3 - - uses: lukka/get-cmake@latest - - name: Restore artifacts, or run vcpkg, build (and cache artifacts as post step) - uses: lukka/run-vcpkg@v10 - id: runvcpkg - with: - vcpkgDirectory: '${{ github.workspace }}/vcpkg' - appendedCacheKey: '${{ env.VCPKG_DEFAULT_TRIPLET }}' - vcpkgGitCommitId: '${{ env.VCPKG_COMMIT_ID }}' - vcpkgJsonGlob: 'vcpkg.json' - runVcpkgInstall: false - - name: Configure developer command prompt - uses: ilammy/msvc-dev-cmd@v1 - with: - arch: ${{matrix.env.arch}} - - name: Run cmake to install the dependencies specified in the vcpkg.json, generate project file - run: | - mkdir ${{ env.buildDir }} - cd ${{ env.buildDir }} - cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=${{matrix.env.build_type}} -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}\vcpkg\scripts\buildsystems\vcpkg.cmake .. - - name: Build the project - run: | - cd ${{ env.buildDir }} - nmake - - name: Prepare artifact folder - run: | - mkdir ${{ env.outDir }} - copy ${{ env.buildDir }}vcpkg_installed/${{matrix.env.arch_installed}}-windows/bin/ogg.dll ${{ env.outDir }} - copy ${{ env.buildDir }}vcpkg_installed/${{matrix.env.arch_installed}}-windows/bin/vorbis.dll ${{ env.outDir }} - copy ${{ env.buildDir }}vcpkg_installed/${{matrix.env.arch_installed}}-windows/bin/vorbisfile.dll ${{ env.outDir }} - copy ${{ env.buildDir }}vcpkg_installed/${{matrix.env.arch_installed}}-windows/bin/swscale-*.dll ${{ env.outDir }} - copy ${{ env.buildDir }}vcpkg_installed/${{matrix.env.arch_installed}}-windows/bin/swresample-*.dll ${{ env.outDir }} - copy ${{ env.buildDir }}Source/*.dll ${{ env.outDir }} - copy ${{ env.buildDir }}Source/*.exe ${{ env.outDir }} - copy ${{ env.buildDir }}Source/*.pdb ${{ env.outDir }} - - uses: actions/upload-artifact@v3 - with: - name: Perimeter MSVC ${{matrix.env.build_type}} ${{matrix.env.arch_name}} ${{matrix.env.bits}} bits - path: ${{ env.outDir }} \ No newline at end of file diff --git a/.github/workflows/windows_msys_build.yml b/.github/workflows/windows_msys_build.yml deleted file mode 100644 index f39b8e054..000000000 --- a/.github/workflows/windows_msys_build.yml +++ /dev/null @@ -1,140 +0,0 @@ -name: Windows MSYS Build - -on: - push: - pull_request: - types: - - opened - - reopened - - synchronize - - ready_for_review - -env: - GH_CACHE_KEY: 8 - -jobs: - build: - if: github.event.pull_request.draft == false - strategy: - fail-fast: false - matrix: - env: [ - {sys: mingw64, build_type: Debug, arch: x86_64, arch_zip: x64}, - {sys: mingw32, build_type: Release, arch: i686, arch_zip: x86}, - {sys: mingw64, build_type: Release, arch: x86_64, arch_zip: x64}, - ] - name: ${{matrix.env.build_type}} ${{matrix.env.sys}} - defaults: - run: - shell: msys2 {0} - runs-on: windows-latest - steps: - - uses: actions/checkout@v3 - - uses: msys2/setup-msys2@v2 - with: - msystem: "${{matrix.env.sys}}" - install: - base-devel - wget - unzip - git - bash - mingw-w64-cross-winpthreads - pacboy: - ninja:p - gcc:p - cmake:p - make:p - SDL2:p - SDL2_image:p - SDL2_net:p - SDL2_mixer:p - boost:p - lld:p - libbacktrace:p - libvpx:p - nasm:p - yasm:p - zlib:p - - uses: actions/cache@v3 - id: cache - with: - path: | - ${{ github.workspace }}\downloads - ${{ github.workspace }}\ffmpeg - key: MSYS-${{matrix.env.arch}}-${{ env.GH_CACHE_KEY }} - - name: SDL2 binaries -- download - if: steps.cache.outputs.cache-hit != 'true' && matrix.env.arch_zip != '' - run: | - mkdir downloads - wget https://github.com/libsdl-org/SDL_image/releases/download/release-2.8.1/SDL2_image-2.8.1-win32-${{matrix.env.arch_zip}}.zip -O downloads/SDL2_image.zip - wget https://github.com/libsdl-org/SDL_mixer/releases/download/release-2.6.3/SDL2_mixer-2.6.3-win32-${{matrix.env.arch_zip}}.zip -O downloads/SDL2_mixer.zip - unzip downloads/SDL2_image.zip -d downloads/SDL2_image - unzip downloads/SDL2_mixer.zip -d downloads/SDL2_mixer - - name: ffmpeg -- download - if: steps.cache.outputs.cache-hit != 'true' - run: git clone --depth 1 --branch n6.1 https://git.ffmpeg.org/ffmpeg.git ffmpeg - - name: ffmpeg -- configure - if: steps.cache.outputs.cache-hit != 'true' - run: | - ./configure \ - --prefix=/${{matrix.env.sys}} \ - --enable-static --disable-shared \ - --disable-everything \ - --enable-swscale \ - --enable-swresample \ - --enable-zlib \ - --enable-libvpx \ - --enable-libvorbis \ - --enable-demuxer=avi,rawvideo,bink,matroska \ - --enable-decoder=png,rawvideo,bink,binkaudio_dct,vorbis,opus,vp8,vp9 \ - --enable-parser=png,vp9 \ - --enable-filter=aresample,aformat \ - --enable-protocol=file \ - --disable-d3d11va \ - --disable-dxva2 \ - --disable-vulkan \ - --disable-network \ - --disable-doc --disable-ffplay --disable-ffprobe --disable-ffmpeg \ - --disable-bzlib --disable-libopenjpeg --disable-iconv - working-directory: ffmpeg - - name: ffmpeg -- build - if: steps.cache.outputs.cache-hit != 'true' - run: | - mingw32-make -j4 - working-directory: ffmpeg - - name: ffmpeg -- install - run: | - mingw32-make install - working-directory: ffmpeg - - name: perimeter -- create build dir - run: mkdir build - - name: perimeter -- configure build - run: cmake -G Ninja - -S .. -B . - -DCMAKE_BUILD_TYPE=${{matrix.env.build_type}} - -DOPTION_LINKER=lld - -DOPTION_LINK_LIBS="bcrypt;winpthread.a" - working-directory: build - - name: perimeter -- make - run: ninja - working-directory: build - - name: perimeter -- prepare artifact folder - run: | - mkdir -p perimeter/bin - cp /${{matrix.env.sys}}/bin/SDL2.dll perimeter/bin/ - cp /${{matrix.env.sys}}/bin/SDL2_net.dll perimeter/bin/ - if [[ -n "${{matrix.env.arch_zip}}" ]]; then - cp downloads/SDL2_image/*.dll perimeter/bin/ - cp downloads/SDL2_mixer/*.dll perimeter/bin/ - else - cp /${{matrix.env.sys}}/bin/SDL2_image.dll perimeter/bin/ - cp /${{matrix.env.sys}}/bin/SDL2_mixer.dll perimeter/bin/ - fi - cp build/Source/perimeter.exe perimeter/bin/ - - name: perimeter -- strip binary - run: strip -g -x perimeter/bin/perimeter.exe - - uses: actions/upload-artifact@v1 - with: - name: Perimeter MSYS ${{matrix.env.build_type}} ${{matrix.env.sys}} - path: perimeter/bin/ \ No newline at end of file