From 8e95b194157e1874dc48f84ec397c0f1874ca0df Mon Sep 17 00:00:00 2001 From: badaix Date: Tue, 20 Aug 2024 22:57:00 +0200 Subject: [PATCH] Reformat yml files --- .github/workflows/ci.yml | 274 +++++++++++++++++----------------- .github/workflows/package.yml | 222 +++++++++++++-------------- 2 files changed, 248 insertions(+), 248 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c875d218..efca3927 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,39 +13,39 @@ jobs: strategy: fail-fast: false matrix: - tool: + tool: - cppcheck runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v4 - - name: print environment - run: env - - name: dependencies - run: sudo apt-get update && sudo apt-get install -yq libasound2-dev libsoxr-dev libvorbisidec-dev libvorbis-dev libflac-dev libopus-dev alsa-utils libpulse-dev libavahi-client-dev avahi-daemon debhelper ccache expat cppcheck - - name: cache boost - id: cache-boost - uses: actions/cache@v4 - with: - path: boost_${{ env.BOOST_VERSION }} - key: boost-${{ env.BOOST_VERSION }} - enableCrossOsArchive: true - - name: get boost - if: steps.cache-boost.outputs.cache-hit != 'true' - run: | - wget https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION//_/.}/source/boost_${BOOST_VERSION}.tar.bz2 - tar xjf boost_${BOOST_VERSION}.tar.bz2 - - name: configure - run: | - cmake -S . -B build \ - -DWERROR=ON -DBUILD_TESTS=ON \ - -DBOOST_ROOT=boost_${BOOST_VERSION} \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE \ - -DCMAKE_CXX_FLAGS="-DCMAKE_CXX_FLAGS=-DJSON_HAS_CPP_14" - - name: analysis - run: cmake --build build --target ${{ matrix.tool }} + - uses: actions/checkout@v4 + - name: print environment + run: env + - name: dependencies + run: sudo apt-get update && sudo apt-get install -yq libasound2-dev libsoxr-dev libvorbisidec-dev libvorbis-dev libflac-dev libopus-dev alsa-utils libpulse-dev libavahi-client-dev avahi-daemon debhelper ccache expat cppcheck + - name: cache boost + id: cache-boost + uses: actions/cache@v4 + with: + path: boost_${{ env.BOOST_VERSION }} + key: boost-${{ env.BOOST_VERSION }} + enableCrossOsArchive: true + - name: get boost + if: steps.cache-boost.outputs.cache-hit != 'true' + run: | + wget https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION//_/.}/source/boost_${BOOST_VERSION}.tar.bz2 + tar xjf boost_${BOOST_VERSION}.tar.bz2 + - name: configure + run: | + cmake -S . -B build \ + -DWERROR=ON -DBUILD_TESTS=ON \ + -DBOOST_ROOT=boost_${BOOST_VERSION} \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE \ + -DCMAKE_CXX_FLAGS="-DCMAKE_CXX_FLAGS=-DJSON_HAS_CPP_14" + - name: analysis + run: cmake --build build --target ${{ matrix.tool }} linux: @@ -53,7 +53,7 @@ jobs: strategy: fail-fast: false matrix: - compiler: + compiler: - clang-10 - clang-11 - clang-12 @@ -134,50 +134,50 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v4 - - name: print environment - run: env - - name: dependencies - run: sudo apt-get update && sudo apt-get install -yq libasound2-dev libsoxr-dev libvorbisidec-dev libvorbis-dev libflac-dev libopus-dev alsa-utils libpulse-dev libavahi-client-dev avahi-daemon debhelper ccache expat cppcheck - - name: cache boost - id: cache-boost - uses: actions/cache@v4 - with: - path: boost_${{ env.BOOST_VERSION }} - key: boost-${{ env.BOOST_VERSION }} - enableCrossOsArchive: true - - name: get boost - if: steps.cache-boost.outputs.cache-hit != 'true' - run: | - wget https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION//_/.}/source/boost_${BOOST_VERSION}.tar.bz2 - tar xjf boost_${BOOST_VERSION}.tar.bz2 - - name: cache ccache - id: cache-ccache - uses: actions/cache@v4 - with: - # TODO: use environment variable $HOME/.ccache - path: /home/runner/.ccache - key: ${{ runner.os }}-${{ matrix.compiler }}-ccache-${{ github.sha }} - restore-keys: ${{ runner.os }}-${{ matrix.compiler }}-ccache- - #- name: ccache dump config - # run: ccache -p - - name: configure - run: | - cmake -S . -B build \ - -DWERROR=ON -DBUILD_TESTS=ON \ - -DBOOST_ROOT=boost_${BOOST_VERSION} \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ - -DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE \ - -DCMAKE_CXX_FLAGS="-DCMAKE_CXX_FLAGS=-DJSON_HAS_CPP_14" - env: - CC: ${{ matrix.cc }} - CXX: ${{ matrix.cxx }} - - name: build - env: - # TODO: use environment variable $HOME/.ccache - CCACHE_DIR: /home/runner/.ccache - run: cmake --build build --parallel 3 --verbose + - uses: actions/checkout@v4 + - name: print environment + run: env + - name: dependencies + run: sudo apt-get update && sudo apt-get install -yq libasound2-dev libsoxr-dev libvorbisidec-dev libvorbis-dev libflac-dev libopus-dev alsa-utils libpulse-dev libavahi-client-dev avahi-daemon debhelper ccache expat cppcheck + - name: cache boost + id: cache-boost + uses: actions/cache@v4 + with: + path: boost_${{ env.BOOST_VERSION }} + key: boost-${{ env.BOOST_VERSION }} + enableCrossOsArchive: true + - name: get boost + if: steps.cache-boost.outputs.cache-hit != 'true' + run: | + wget https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION//_/.}/source/boost_${BOOST_VERSION}.tar.bz2 + tar xjf boost_${BOOST_VERSION}.tar.bz2 + - name: cache ccache + id: cache-ccache + uses: actions/cache@v4 + with: + # TODO: use environment variable $HOME/.ccache + path: /home/runner/.ccache + key: ${{ runner.os }}-${{ matrix.compiler }}-ccache-${{ github.sha }} + restore-keys: ${{ runner.os }}-${{ matrix.compiler }}-ccache- + #- name: ccache dump config + # run: ccache -p + - name: configure + run: | + cmake -S . -B build \ + -DWERROR=ON -DBUILD_TESTS=ON \ + -DBOOST_ROOT=boost_${BOOST_VERSION} \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ + -DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE \ + -DCMAKE_CXX_FLAGS="-DCMAKE_CXX_FLAGS=-DJSON_HAS_CPP_14" + env: + CC: ${{ matrix.cc }} + CXX: ${{ matrix.cxx }} + - name: build + env: + # TODO: use environment variable $HOME/.ccache + CCACHE_DIR: /home/runner/.ccache + run: cmake --build build --parallel 3 --verbose macos: @@ -185,7 +185,7 @@ jobs: strategy: fail-fast: false matrix: - xcode: + xcode: - "13.1" - "13.2" - "13.3" @@ -230,42 +230,42 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v4 - - name: print environment - run: env - - name: dependencies - run: brew install pkgconfig libsoxr flac libvorbis opus ccache expat - - name: cache boost - id: cache-boost - uses: actions/cache@v4 - with: - path: boost_${{ env.BOOST_VERSION }} - key: boost-${{ env.BOOST_VERSION }} - enableCrossOsArchive: true - - name: get boost - if: steps.cache-boost.outputs.cache-hit != 'true' - run: | - wget https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION//_/.}/source/boost_${BOOST_VERSION}.tar.bz2 - tar xjf boost_${BOOST_VERSION}.tar.bz2 - - name: cache ccache - id: cache-ccache - uses: actions/cache@v4 - with: - path: /Users/runner/Library/Caches/ccache - key: ${{ runner.os }}-${{ matrix.xcode }}-ccache-${{ github.sha }} - restore-keys: ${{ runner.os }}-${{ matrix.xcode }}-ccache- - - name: configure - run: | - cmake -S . -B build \ - -DWERROR=ON -DBUILD_TESTS=ON \ - -DBOOST_ROOT=boost_${BOOST_VERSION} \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ - -DCMAKE_CXX_FLAGS="-I/usr/local/include -DCMAKE_CXX_FLAGS=-DJSON_HAS_CPP_14" - env: - DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer - - name: build - run: cmake --build build --parallel 3 --verbose + - uses: actions/checkout@v4 + - name: print environment + run: env + - name: dependencies + run: brew install pkgconfig libsoxr flac libvorbis opus ccache expat + - name: cache boost + id: cache-boost + uses: actions/cache@v4 + with: + path: boost_${{ env.BOOST_VERSION }} + key: boost-${{ env.BOOST_VERSION }} + enableCrossOsArchive: true + - name: get boost + if: steps.cache-boost.outputs.cache-hit != 'true' + run: | + wget https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION//_/.}/source/boost_${BOOST_VERSION}.tar.bz2 + tar xjf boost_${BOOST_VERSION}.tar.bz2 + - name: cache ccache + id: cache-ccache + uses: actions/cache@v4 + with: + path: /Users/runner/Library/Caches/ccache + key: ${{ runner.os }}-${{ matrix.xcode }}-ccache-${{ github.sha }} + restore-keys: ${{ runner.os }}-${{ matrix.xcode }}-ccache- + - name: configure + run: | + cmake -S . -B build \ + -DWERROR=ON -DBUILD_TESTS=ON \ + -DBOOST_ROOT=boost_${BOOST_VERSION} \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ + -DCMAKE_CXX_FLAGS="-I/usr/local/include -DCMAKE_CXX_FLAGS=-DJSON_HAS_CPP_14" + env: + DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer + - name: build + run: cmake --build build --parallel 3 --verbose windows: @@ -273,7 +273,7 @@ jobs: strategy: fail-fast: false matrix: - compiler: + compiler: - vs-16 - vs-17 include: @@ -287,29 +287,29 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v4 - - name: cache dependencies - id: cache-dependencies - uses: actions/cache@v4 - with: - #path: ${VCPKG_INSTALLATION_ROOT}\installed - path: c:\vcpkg\installed - key: ${{ runner.os }}-dependencies - - name: dependencies - if: steps.cache-dependencies.outputs.cache-hit != 'true' - run: | - cd c:\vcpkg - git pull - vcpkg.exe update - vcpkg.exe --triplet x64-windows install libflac libvorbis soxr opus boost-asio - - name: configure - run: | - echo vcpkg installation root: ${env:VCPKG_INSTALLATION_ROOT} - cmake -S . -B build -G "${{ matrix.vs }}" ` - -DWERROR=ON -DBUILD_TESTS=ON ` - -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" ` - -DVCPKG_TARGET_TRIPLET="x64-windows" ` - -DCMAKE_BUILD_TYPE=Release ` - -DREVISION="${{ github.sha }}" - - name: build - run: cmake --build build --config Release --parallel 3 --verbose + - uses: actions/checkout@v4 + - name: cache dependencies + id: cache-dependencies + uses: actions/cache@v4 + with: + #path: ${VCPKG_INSTALLATION_ROOT}\installed + path: c:\vcpkg\installed + key: ${{ runner.os }}-dependencies + - name: dependencies + if: steps.cache-dependencies.outputs.cache-hit != 'true' + run: | + cd c:\vcpkg + git pull + vcpkg.exe update + vcpkg.exe --triplet x64-windows install libflac libvorbis soxr opus boost-asio + - name: configure + run: | + echo vcpkg installation root: ${env:VCPKG_INSTALLATION_ROOT} + cmake -S . -B build -G "${{ matrix.vs }}" ` + -DWERROR=ON -DBUILD_TESTS=ON ` + -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" ` + -DVCPKG_TARGET_TRIPLET="x64-windows" ` + -DCMAKE_BUILD_TYPE=Release ` + -DREVISION="${{ github.sha }}" + - name: build + run: cmake --build build --config Release --parallel 3 --verbose diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 45e96a80..b16fe466 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -1,7 +1,7 @@ name: Package run-name: Package ${{ github.sha }} by @${{ github.actor }} -on: +on: workflow_dispatch: permissions: @@ -49,7 +49,7 @@ jobs: debian: - bullseye - bookworm - arch: + arch: - amd64 - armhf - arm64 @@ -71,74 +71,74 @@ jobs: container: image: ${{matrix.image_prefix}}${{matrix.debian}} steps: - - name: Get dependencies - run: apt-get update && apt-get install -yq wget debhelper build-essential cmake git rename libatomic1 libasound2-dev libsoxr-dev libvorbisidec-dev libvorbis-dev libflac-dev libopus-dev alsa-utils libpulse-dev libavahi-client-dev avahi-daemon libexpat1-dev python3 ccache unzip - env: - DEBIAN_FRONTEND: noninteractive - - name: Get GitHub cli - run: | - (type -p wget >/dev/null || (apt update && apt-get install wget -y)) \ - && mkdir -p -m 755 /etc/apt/keyrings \ - && wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \ - && chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \ - && echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null \ - && apt update \ - && apt install gh -y - - name: Checkout - uses: actions/checkout@v4 - - name: Setup environment - run: | - echo "PARENT_DIR=$(dirname $GITHUB_WORKSPACE)" >> $GITHUB_ENV - BOOST_DOT_VERSION=$(echo ${BOOST_VERSION} | sed 's/_/./g') - echo "BOOST_DOT_VERSION=$BOOST_DOT_VERSION" >> $GITHUB_ENV - echo "BOOST=boost_${BOOST_VERSION}" >> $GITHUB_ENV - ln -s extras/package/debian debian - - name: Create changelog - run: | - $GITHUB_WORKSPACE/debian/changelog_md2deb.py $GITHUB_WORKSPACE/changelog.md > $GITHUB_WORKSPACE/debian/changelog - cat $GITHUB_WORKSPACE/debian/changelog - - name: Clean up - run: rm -rf ${{env.PARENT_DIR}}/snap*_*.deb - - name: Cache boost - id: cache-boost - uses: actions/cache@v4 - with: - path: ${{env.BOOST}} - key: ${{env.BOOST}} - - name: Get boost - if: steps.cache-boost.outputs.cache-hit != 'true' - run: | - wget https://boostorg.jfrog.io/artifactory/main/release/${{env.BOOST_DOT_VERSION}}/source/${{env.BOOST}}.tar.bz2 - tar xjf ${{env.BOOST}}.tar.bz2 - - name: cache ccache - id: cache-ccache - uses: actions/cache@v4 - with: - # TODO: use environment variable $HOME/.ccache - path: /home/runner/.ccache - key: ${{ matrix.os }}-${{ matrix.debian }}-ccache-${{ github.sha }} - restore-keys: ${{ matrix.os }}-${{ matrix.debian }}-ccache- - - name: Get Snapweb - run: | - wget https://github.com/badaix/snapweb/releases/download/${SNAPWEB_VERSION}/snapweb.zip - unzip snapweb.zip -d snapweb - - name: Create deb package - env: - # TODO: use environment variable $HOME/.ccache - CCACHE_DIR: /home/runner/.ccache - run: | - fakeroot make -f debian/rules CMAKEFLAGS="-DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DBOOST_ROOT=$GITHUB_WORKSPACE/${{env.BOOST}} -DCMAKE_BUILD_TYPE:STRING=Release -DREVISION=${{ github.sha }} -DBUILD_WITH_JACK=OFF -DBUILD_WITH_PULSE=OFF -DSNAPWEB_DIR:STRING=$GITHUB_WORKSPACE/snapweb" binary - rename 's/_${{ matrix.arch }}/_${{ matrix.arch }}_${{ matrix.debian }}/g' ../snap*_${{ matrix.arch }}.deb - fakeroot make -f debian/rules clean - fakeroot make -f debian/rules CMAKEFLAGS="-DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DBOOST_ROOT=$GITHUB_WORKSPACE/${{env.BOOST}} -DCMAKE_BUILD_TYPE:STRING=Release -DREVISION=${{ github.sha }} -DBUILD_WITH_JACK=OFF -DSNAPWEB_DIR:STRING=$GITHUB_WORKSPACE/snapweb" binary - rm ../snapserver_*_${{ matrix.arch }}.deb - rename 's/_${{ matrix.arch }}/_${{ matrix.arch }}_${{ matrix.debian }}_with-pulse/g' ../snap*_${{ matrix.arch }}.deb - - name: Release artifacts - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - git config --global --add safe.directory $GITHUB_WORKSPACE - gh release upload ${{needs.release.outputs.tag}} ${{env.PARENT_DIR}}/snap*_*.deb + - name: Get dependencies + run: apt-get update && apt-get install -yq wget debhelper build-essential cmake git rename libatomic1 libasound2-dev libsoxr-dev libvorbisidec-dev libvorbis-dev libflac-dev libopus-dev alsa-utils libpulse-dev libavahi-client-dev avahi-daemon libexpat1-dev python3 ccache unzip + env: + DEBIAN_FRONTEND: noninteractive + - name: Get GitHub cli + run: | + (type -p wget >/dev/null || (apt update && apt-get install wget -y)) \ + && mkdir -p -m 755 /etc/apt/keyrings \ + && wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \ + && chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \ + && echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null \ + && apt update \ + && apt install gh -y + - name: Checkout + uses: actions/checkout@v4 + - name: Setup environment + run: | + echo "PARENT_DIR=$(dirname $GITHUB_WORKSPACE)" >> $GITHUB_ENV + BOOST_DOT_VERSION=$(echo ${BOOST_VERSION} | sed 's/_/./g') + echo "BOOST_DOT_VERSION=$BOOST_DOT_VERSION" >> $GITHUB_ENV + echo "BOOST=boost_${BOOST_VERSION}" >> $GITHUB_ENV + ln -s extras/package/debian debian + - name: Create changelog + run: | + $GITHUB_WORKSPACE/debian/changelog_md2deb.py $GITHUB_WORKSPACE/changelog.md > $GITHUB_WORKSPACE/debian/changelog + cat $GITHUB_WORKSPACE/debian/changelog + - name: Clean up + run: rm -rf ${{env.PARENT_DIR}}/snap*_*.deb + - name: Cache boost + id: cache-boost + uses: actions/cache@v4 + with: + path: ${{env.BOOST}} + key: ${{env.BOOST}} + - name: Get boost + if: steps.cache-boost.outputs.cache-hit != 'true' + run: | + wget https://boostorg.jfrog.io/artifactory/main/release/${{env.BOOST_DOT_VERSION}}/source/${{env.BOOST}}.tar.bz2 + tar xjf ${{env.BOOST}}.tar.bz2 + - name: cache ccache + id: cache-ccache + uses: actions/cache@v4 + with: + # TODO: use environment variable $HOME/.ccache + path: /home/runner/.ccache + key: ${{ matrix.os }}-${{ matrix.debian }}-ccache-${{ github.sha }} + restore-keys: ${{ matrix.os }}-${{ matrix.debian }}-ccache- + - name: Get Snapweb + run: | + wget https://github.com/badaix/snapweb/releases/download/${SNAPWEB_VERSION}/snapweb.zip + unzip snapweb.zip -d snapweb + - name: Create deb package + env: + # TODO: use environment variable $HOME/.ccache + CCACHE_DIR: /home/runner/.ccache + run: | + fakeroot make -f debian/rules CMAKEFLAGS="-DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DBOOST_ROOT=$GITHUB_WORKSPACE/${{env.BOOST}} -DCMAKE_BUILD_TYPE:STRING=Release -DREVISION=${{ github.sha }} -DBUILD_WITH_JACK=OFF -DBUILD_WITH_PULSE=OFF -DSNAPWEB_DIR:STRING=$GITHUB_WORKSPACE/snapweb" binary + rename 's/_${{ matrix.arch }}/_${{ matrix.arch }}_${{ matrix.debian }}/g' ../snap*_${{ matrix.arch }}.deb + fakeroot make -f debian/rules clean + fakeroot make -f debian/rules CMAKEFLAGS="-DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DBOOST_ROOT=$GITHUB_WORKSPACE/${{env.BOOST}} -DCMAKE_BUILD_TYPE:STRING=Release -DREVISION=${{ github.sha }} -DBUILD_WITH_JACK=OFF -DSNAPWEB_DIR:STRING=$GITHUB_WORKSPACE/snapweb" binary + rm ../snapserver_*_${{ matrix.arch }}.deb + rename 's/_${{ matrix.arch }}/_${{ matrix.arch }}_${{ matrix.debian }}_with-pulse/g' ../snap*_${{ matrix.arch }}.deb + - name: Release artifacts + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + git config --global --add safe.directory $GITHUB_WORKSPACE + gh release upload ${{needs.release.outputs.tag}} ${{env.PARENT_DIR}}/snap*_*.deb win: @@ -147,47 +147,47 @@ jobs: name: win steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout Snapcast - uses: actions/checkout@v4 - with: - repository: badaix/snapcast - path: src/snapcast - ref: ${{ env.VERSION }} - - name: Cache dependencies - id: cache-dependencies - uses: actions/cache@v4 - with: - #path: ${VCPKG_INSTALLATION_ROOT}\installed - path: c:\vcpkg\installed - key: ${{ runner.os }}-dependencies - - name: Get dependenciesenv - if: steps.cache-dependencies.outputs.cache-hit != 'true' - run: vcpkg.exe install libflac libvorbis soxr opus boost-asio --triplet x64-windows - - name: configure - run: | - echo vcpkg installation root: $env:VCPKG_INSTALLATION_ROOT - cmake -S . -B build -G "Visual Studio 16 2019" -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET="x64-windows" -DCMAKE_BUILD_TYPE="Release" -DREVISION="${{ github.sha }}" -DWERROR=ON -DBUILD_TESTS=ON - - name: build - run: cmake --build build --config Release --parallel 3 --verbose - - name: installer - run: | - mkdir bundle - copy ${env:VCPKG_INSTALLATION_ROOT}\installed\x64-windows\bin\FLAC.dll bundle\ - copy ${env:VCPKG_INSTALLATION_ROOT}\installed\x64-windows\bin\ogg.dll bundle\ - copy ${env:VCPKG_INSTALLATION_ROOT}\installed\x64-windows\bin\opus.dll bundle\ - copy ${env:VCPKG_INSTALLATION_ROOT}\installed\x64-windows\bin\vorbis.dll bundle\ - copy ${env:VCPKG_INSTALLATION_ROOT}\installed\x64-windows\bin\soxr.dll bundle\ - copy "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Redist\MSVC\v142\vc_redist.x64.exe" bundle\ - copy bin\Release\snapclient.exe bundle\ - Compress-Archive -Path bundle\* -Destination snapclient_win64.zip - - name: Release artifacts - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - git config --global --add safe.directory . - gh release upload ${{needs.release.outputs.tag}} snapclient_win64.zip + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout Snapcast + uses: actions/checkout@v4 + with: + repository: badaix/snapcast + path: src/snapcast + ref: ${{ env.VERSION }} + - name: Cache dependencies + id: cache-dependencies + uses: actions/cache@v4 + with: + #path: ${VCPKG_INSTALLATION_ROOT}\installed + path: c:\vcpkg\installed + key: ${{ runner.os }}-dependencies + - name: Get dependenciesenv + if: steps.cache-dependencies.outputs.cache-hit != 'true' + run: vcpkg.exe install libflac libvorbis soxr opus boost-asio --triplet x64-windows + - name: configure + run: | + echo vcpkg installation root: $env:VCPKG_INSTALLATION_ROOT + cmake -S . -B build -G "Visual Studio 16 2019" -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET="x64-windows" -DCMAKE_BUILD_TYPE="Release" -DREVISION="${{ github.sha }}" -DWERROR=ON -DBUILD_TESTS=ON + - name: build + run: cmake --build build --config Release --parallel 3 --verbose + - name: installer + run: | + mkdir bundle + copy ${env:VCPKG_INSTALLATION_ROOT}\installed\x64-windows\bin\FLAC.dll bundle\ + copy ${env:VCPKG_INSTALLATION_ROOT}\installed\x64-windows\bin\ogg.dll bundle\ + copy ${env:VCPKG_INSTALLATION_ROOT}\installed\x64-windows\bin\opus.dll bundle\ + copy ${env:VCPKG_INSTALLATION_ROOT}\installed\x64-windows\bin\vorbis.dll bundle\ + copy ${env:VCPKG_INSTALLATION_ROOT}\installed\x64-windows\bin\soxr.dll bundle\ + copy "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Redist\MSVC\v142\vc_redist.x64.exe" bundle\ + copy bin\Release\snapclient.exe bundle\ + Compress-Archive -Path bundle\* -Destination snapclient_win64.zip + - name: Release artifacts + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + git config --global --add safe.directory . + gh release upload ${{needs.release.outputs.tag}} snapclient_win64.zip # mac: # strategy: