From de6ab120aca1abb733194a57ff947fbd5d83c6ed Mon Sep 17 00:00:00 2001 From: Tres Finocchiaro Date: Mon, 10 Feb 2025 21:40:04 -0500 Subject: [PATCH] Testing github actions --- .github/workflows/build.yml | 386 +----------------------------------- 1 file changed, 4 insertions(+), 382 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dba43292de2..73d27bab649 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,17 +6,8 @@ concurrency: cancel-in-progress: true jobs: linux-x86_64: - name: linux-x86_64 - runs-on: ubuntu-22.04 - env: - CMAKE_OPTS: >- - -DUSE_WERROR=ON - -DCMAKE_BUILD_TYPE=RelWithDebInfo - -DUSE_COMPILE_CACHE=ON - -DWANT_DEBUG_CPACK=ON - CCACHE_MAXSIZE: 0 - CCACHE_NOCOMPRESS: 1 - MAKEFLAGS: -j2 + name: testing + runs-on: ubuntu-24.04 steps: - name: Configure git run: git config --global --add safe.directory "$GITHUB_WORKSPACE" @@ -24,375 +15,6 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 - submodules: recursive - - name: Configure winehq + - name: Run test run: | - sudo dpkg --add-architecture i386 - sudo mkdir -pm755 /etc/apt/keyrings - wget -O - https://dl.winehq.org/wine-builds/winehq.key | \ - sudo gpg --dearmor -o /etc/apt/keyrings/winehq-archive.key - - sudo wget -NP /etc/apt/sources.list.d/ \ - https://dl.winehq.org/wine-builds/ubuntu/dists/$(lsb_release -cs)/winehq-$(lsb_release -cs).sources - - name: Install packages - run: | - sudo apt-get update -y - sudo apt-get install -y --no-install-recommends \ - $(xargs < .github/workflows/deps-ubuntu-24.04-gcc.txt) - sudo apt-get install -y --install-recommends g++-multilib gcc-multilib winehq-stable wine-stable-dev - - name: Cache ccache data - uses: actions/cache@v3 - with: - key: ccache-${{ github.job }}-${{ github.ref }}-${{ github.run_id }} - restore-keys: | - ccache-${{ github.job }}-${{ github.ref }}- - ccache-${{ github.job }}- - path: ~/.ccache - - name: Configure - run: | - ccache --zero-stats - source /opt/qt5*/bin/qt5*-env.sh || true - cmake -S . \ - -B build \ - $CMAKE_OPTS - - name: Build - run: cmake --build build - - name: Run tests - run: | - cd build/tests - ctest --output-on-failure -j2 - - name: Package - run: | - cmake --build build --target package - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: linux - path: build/lmms-*.AppImage - - name: Trim ccache and print statistics - run: | - ccache --cleanup - echo "[ccache config]" - ccache --show-config - echo "[ccache stats]" - ccache --show-stats - env: - CCACHE_MAXSIZE: 500M - linux-arm64: - name: linux-arm64 - runs-on: ubuntu-24.04-arm - env: - CMAKE_OPTS: >- - -DUSE_WERROR=ON - -DCMAKE_BUILD_TYPE=RelWithDebInfo - -DUSE_COMPILE_CACHE=ON - -DWANT_DEBUG_CPACK=ON - CCACHE_MAXSIZE: 0 - CCACHE_NOCOMPRESS: 1 - MAKEFLAGS: -j2 - DEBIAN_FRONTEND: noninteractive - steps: - - name: Configure git - run: git config --global --add safe.directory "$GITHUB_WORKSPACE" - - name: Check out - uses: actions/checkout@v3 - with: - fetch-depth: 0 - submodules: recursive - - name: Install system packages - run: | - sudo apt-get update -y - sudo apt-get install -y --no-install-recommends \ - $(xargs < .github/workflows/deps-ubuntu-24.04-gcc.txt) - - name: Cache ccache data - uses: actions/cache@v3 - with: - key: ccache-${{ github.job }}-${{ github.ref }}-${{ github.run_id }} - restore-keys: | - ccache-${{ github.job }}-${{ github.ref }}- - ccache-${{ github.job }}- - path: ~/.ccache - - name: Configure - run: | - ccache --zero-stats - cmake -S . \ - -B build \ - -DWANT_VST_32=OFF \ - -DWANT_VST_64=OFF \ - $CMAKE_OPTS - - name: Build - run: cmake --build build - - name: Run tests - run: | - cd build/tests - ctest --output-on-failure -j2 - - name: Package - run: | - cmake --build build --target package - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: linux-arm64 - path: build/lmms-*.AppImage - - name: Trim ccache and print statistics - run: | - ccache --cleanup - echo "[ccache config]" - ccache --show-config - echo "[ccache stats]" - ccache --show-stats - env: - CCACHE_MAXSIZE: 500M - macos: - strategy: - fail-fast: false - matrix: - arch: [ x86_64, arm64 ] - include: - - arch: x86_64 - os: macos-13 - xcode: "15.2" - - arch: arm64 - os: macos-14 - xcode: "15.4" - name: macos-${{ matrix.arch }} - runs-on: ${{ matrix.os }} - env: - CMAKE_OPTS: >- - -Werror=dev - -DUSE_WERROR=ON - -DCMAKE_BUILD_TYPE=RelWithDebInfo - -DUSE_COMPILE_CACHE=ON - CCACHE_MAXSIZE: 0 - CCACHE_NOCOMPRESS: 1 - MAKEFLAGS: -j3 - DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer - steps: - - name: Check out - uses: actions/checkout@v3 - with: - fetch-depth: 0 - submodules: recursive - - name: Clean up Homebrew download cache - run: rm -rf ~/Library/Caches/Homebrew/downloads - - name: Restore Homebrew download cache - id: cache-homebrew - uses: actions/cache/restore@v3 - with: - key: n/a - only restore from restore-keys - restore-keys: | - homebrew-${{ matrix.arch }}- - path: ~/Library/Caches/Homebrew/downloads - - name: Cache ccache data - uses: actions/cache@v3 - with: - key: "ccache-${{ github.job }}-${{ matrix.arch }}-${{ github.ref }}\ - -${{ github.run_id }}" - restore-keys: | - ccache-${{ github.job }}-${{ matrix.arch }}-${{ github.ref }}- - ccache-${{ github.job }}-${{ matrix.arch }}- - path: ~/Library/Caches/ccache - - name: Install dependencies - run: | - brew bundle install --verbose - npm update -g npm - npm install --location=global appdmg - env: - HOMEBREW_NO_AUTO_UPDATE: 1 - HOMEBREW_NO_INSTALL_UPGRADE: 1 - HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1 - - name: Configure - run: | - ccache --zero-stats - mkdir build - cmake -S . \ - -B build \ - -DCMAKE_PREFIX_PATH="$(brew --prefix qt@5)" \ - -DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }} \ - $CMAKE_OPTS \ - -DUSE_WERROR=OFF - - name: Build - run: cmake --build build - - name: Run tests - run: | - cd build/tests - ctest --output-on-failure -j3 - - name: Package - run: | - cmake --build build --target package - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: macos-${{ matrix.arch }} - path: build/lmms-*.dmg - - name: Trim ccache and print statistics - run: | - ccache --cleanup - echo "[ccache config]" - ccache --show-config - echo "[ccache stats]" - ccache --show-stats --verbose - env: - CCACHE_MAXSIZE: 500MB - - name: Save Homebrew download cache - if: ${{ steps.cache-homebrew.outputs.cache-matched-key != env.key }} - uses: actions/cache/save@v3 - with: - key: ${{ env.key }} - path: ~/Library/Caches/Homebrew/downloads - env: - key: "homebrew-${{ matrix.arch }}\ - -${{ hashFiles('Brewfile.lock.json') }}" - mingw: - name: mingw64 - runs-on: ubuntu-latest - env: - CMAKE_OPTS: >- - -Werror=dev - -DUSE_WERROR=ON - -DCMAKE_BUILD_TYPE=RelWithDebInfo - -DUSE_COMPILE_CACHE=ON - CCACHE_MAXSIZE: 0 - CCACHE_NOCOMPRESS: 1 - MAKEFLAGS: -j2 - steps: - - name: Configure apt - run: | - sudo sh -c 'echo "deb http://ppa.launchpad.net/tobydox/mingw-w64/ubuntu focal main" > \ - /etc/apt/sources.list.d/tobydox-mingw-w64.list' - sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 72931B477E22FEFD47F8DECE02FE5F12ADDE29B2 - sudo apt-get update -y - - name: Configure git - run: git config --global --add safe.directory "$GITHUB_WORKSPACE" - - name: Check out - uses: actions/checkout@v3 - with: - fetch-depth: 0 - submodules: recursive - - name: Cache ccache data - uses: actions/cache@v3 - with: - key: "ccache-${{ github.job }}-64-${{ github.ref }}\ - -${{ github.run_id }}" - restore-keys: | - ccache-${{ github.job }}-64-${{ github.ref }}- - ccache-${{ github.job }}-64- - path: ~/.ccache - - name: Install dependencies - run: | - sudo apt-get install -y --no-install-recommends \ - $(xargs < .github/workflows/deps-ubuntu-24.04-mingw.txt) - - name: Configure - run: | - ccache --zero-stats - cmake -S . \ - -B build \ - -DCMAKE_TOOLCHAIN_FILE="./cmake/toolchains/MinGW-W64-64.cmake" \ - $CMAKE_OPTS - - name: Build - run: cmake --build build - - name: Package - run: cmake --build build --target package - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: mingw64 - path: build/lmms-*.exe - - name: Trim ccache and print statistics - run: | - ccache --cleanup - echo "[ccache config]" - ccache --show-config - echo "[ccache stats]" - ccache --show-stats - env: - CCACHE_MAXSIZE: 500M - msvc: - name: msvc-x64 - runs-on: windows-2019 - env: - CCACHE_MAXSIZE: 0 - CCACHE_NOCOMPRESS: 1 - steps: - - name: Check out - uses: actions/checkout@v3 - with: - fetch-depth: 0 - submodules: recursive - - name: Update vcpkg (TEMPORARY) - run: | - cd $env:VCPKG_INSTALLATION_ROOT - git pull - .\bootstrap-vcpkg.bat - shell: pwsh - - name: Cache vcpkg dependencies - id: cache-deps - uses: actions/cache@v3 - with: - key: vcpkg-x64-${{ hashFiles('vcpkg.json') }} - restore-keys: | - vcpkg-x64- - path: build\vcpkg_installed - - name: Cache ccache data - uses: actions/cache@v3 - with: - # yamllint disable rule:line-length - key: "ccache-${{ github.job }}-x64-${{ github.ref }}\ - -${{ github.run_id }}" - restore-keys: | - ccache-${{ github.job }}-x64-${{ github.ref }}- - ccache-${{ github.job }}-x64- - path: ~\AppData\Local\ccache - # yamllint enable rule:line-length - - name: Install tools - run: choco install ccache - - name: Install Qt - uses: jurplel/install-qt-action@b3ea5275e37b734d027040e2c7fe7a10ea2ef946 - with: - version: '5.15.2' - arch: "win64_msvc2019_64" - archives: qtbase qtsvg qttools - cache: true - - name: Set up build environment - uses: ilammy/msvc-dev-cmd@cec98b9d092141f74527d0afa6feb2af698cfe89 - with: - arch: x64 - - name: Configure - run: | - ccache --zero-stats - mkdir build -Force - cmake -S . ` - -B build ` - -G Ninja ` - --toolchain C:/vcpkg/scripts/buildsystems/vcpkg.cmake ` - -Werror=dev ` - -DCMAKE_BUILD_TYPE=RelWithDebInfo ` - -DUSE_COMPILE_CACHE=ON ` - -DUSE_WERROR=ON ` - -DVCPKG_TARGET_TRIPLET="x64-windows" ` - -DVCPKG_HOST_TRIPLET="x64-windows" ` - -DVCPKG_MANIFEST_INSTALL="${{ env.should_install_manifest }}" - env: - should_install_manifest: - ${{ steps.cache-deps.outputs.cache-hit == 'true' && 'NO' || 'YES' }} - - name: Build - run: cmake --build build - - name: Run tests - run: | - cd build/tests - ctest --output-on-failure -j2 - - name: Package - run: cmake --build build --target package - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: msvc-x64 - path: build\lmms-*.exe - - name: Trim ccache and print statistics - run: | - ccache --cleanup - echo "[ccache config]" - ccache --show-config - echo "[ccache stats]" - ccache --show-stats --verbose - env: - CCACHE_MAXSIZE: 500MB + git log -1 --pretty=format:"%H"