diff --git a/.github/workflows/build-debian-seflhosted.yml b/.github/workflows/build-debian-seflhosted.yml deleted file mode 100644 index 0dfc6ecbe..000000000 --- a/.github/workflows/build-debian-seflhosted.yml +++ /dev/null @@ -1,120 +0,0 @@ -name: Build-debian - -on: - push: - pull_request: - workflow_dispatch: - -env: - VULKAN_SDK_VERSION: 1.275.0 - -jobs: - - debian: - runs-on: [self-hosted, linux, x64, gpu] - - steps: - - - uses: actions/checkout@v3 - with: - submodules: recursive - - - name: Install Dependencies - run: | - sudo apt-get update - sudo apt-get -y install \ - build-essential \ - git \ - cmake \ - pkgconf \ - libgtkmm-3.0-dev \ - libsigc++-2.0-dev \ - libyaml-cpp-dev \ - catch2 \ - libglfw3-dev \ - curl \ - xzip \ - liblxi-dev \ - dvipng \ - texlive \ - texlive-fonts-extra \ - texlive-extra-utils \ - libhidapi-dev - - - name: Clone and Build FFTS Library - run: | - git clone https://github.com/anthonix/ffts.git /tmp/ffts - pushd /tmp/ffts - mkdir build - cd build - cmake \ - -DENABLE_SHARED=ON \ - .. - make -j - sudo make install - popd - - - name: Install Vulkan SDK - run: | - pushd ~ - mkdir vulkan - cd vulkan - wget https://sdk.lunarg.com/sdk/download/${{ env.VULKAN_SDK_VERSION }}/linux/vulkansdk-linux-x86_64-${{ env.VULKAN_SDK_VERSION }}.tar.gz - tar xf vulkansdk-linux-x86_64-${{ env.VULKAN_SDK_VERSION }}.tar.gz - - - name: Build - run: | - source =~/vulkan/${{ env.VULKAN_SDK_VERSION }}/setup-env.sh - mkdir build - cd build - cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_DOCS=ON \ - .. - make -j 32 - - - name: Run Tests - if: ${{ true }} # Temporary re-enabled Run Tests - run: | - cd build - make test - - - name: Upload Artifacts - if: ${{ always() }} - uses: actions/upload-artifact@v3 - with: - name: ngscopeclient-linux - path: | - build/src/ngscopeclient/ngscopeclient - build/src/ngscopeclient/icons/* - build/src/ngscopeclient/shaders/* - build/lib/scopehal/libscopehal.so - build/lib/scopeprotocols/libscopeprotocols.so - - - name: Upload Documentation - uses: actions/upload-artifact@v3 - with: - name: ngscopeclient-manual - path: build/doc/ngscopeclient-manual.pdf - - - name: Upload Test Log - if: ${{ always() }} - uses: actions/upload-artifact@v3 - with: - name: ngscopeclient-test_log - path: build/Testing/Temporary/LastTest.log - - cycle-debian-vm: - runs-on: [self-hosted, orchestrator] - needs: [debian] - if: ${{ false }} - steps: - - name: Cycle vm - shell: bash - env: - XOA_URL: ${{ secrets.XOA_URL }} - XOA_USER: ${{ secrets.XOA_USER }} - XOA_PASSWORD: ${{ secrets.XOA_PASSWORD }} - run: | - pushd ~ - ./cycle-debian.sh diff --git a/.github/workflows/build-debian.yml b/.github/workflows/build-debian.yml new file mode 100644 index 000000000..f7e647a99 --- /dev/null +++ b/.github/workflows/build-debian.yml @@ -0,0 +1,200 @@ +name: Build-debian + +on: + push: + pull_request: + workflow_dispatch: + +env: + SDK_VERSION_STANDALONE: 1.4.309.0 + SDK_VERSION_REPO: 1.4.309 + +jobs: + Linux: + strategy: + fail-fast: false + matrix: + os: + - name: debian + version: bookworm + container: debian:bookworm + sdk_type: [repo, standalone] + docs: [true, false] + exclude: + - sdk_type: standalone + docs: true + + runs-on: ubuntu-latest + container: + image: ${{ matrix.os.container }} + env: + SDK_VERSION_STANDALONE: 1.4.309.0 + SDK_VERSION_REPO: 1.4.309 + + defaults: + run: + shell: bash + + steps: + - name: show env + run: env + - name: Install General Dependencies + run: | + apt-get update + apt-get upgrade + apt-get install -y \ + git \ + ccache \ + build-essential \ + cmake \ + pkgconf \ + libgtkmm-3.0-dev \ + libcairomm-1.0-dev \ + libsigc++-2.0-dev \ + libyaml-cpp-dev \ + catch2 \ + libglfw3-dev \ + curl \ + xzip \ + libhidapi-dev \ + ninja-build \ + glslang-dev \ + glslang-tools \ + spirv-tools \ + glslc + + - name: Install Docs Dependencies + if: ${{ matrix.docs }} + run: | + apt-get install -y \ + texlive \ + texlive-fonts-extra \ + texlive-extra-utils + + - name: Install Vulkan Repo Dependencies + if: ${{ (matrix.sdk_type == 'repo') }} + run: | + apt-get install -y \ + libvulkan-dev + + - name: Check Out Code + uses: actions/checkout@v4 + with: + submodules: recursive + fetch-depth: 0 + + - name: Use CCache + if: ${{ ! matrix.docs }} + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ github.job }}-${{ matrix.os.container }}-${{ matrix.sdk_type}} + max-size: "1500M" + + - name: Cache Vulkan SDK Standalone + if: ${{ matrix.sdk_type == 'standalone' }} + uses: actions/cache@v4 + with: + path: ~/VulkanSDK + key: ${{ matrix.os.container }}-vulkansdk-${{ env.SDK_VERSION_STANDALONE }} + + - name: Install Vulkan SDK (Standalone) + if: ${{ matrix.sdk_type == 'standalone' }} + run: | + [[ -d ~/VulkanSDK/${{ env.SDK_VERSION_STANDALONE }} ]] && exit 0 + cd + mkdir VulkanSDK + cd VulkanSDK + curl -LO https://sdk.lunarg.com/sdk/download/${{ env.SDK_VERSION_STANDALONE }}/linux/vulkansdk-linux-x86_64-${{ env.SDK_VERSION_STANDALONE }}.tar.xz + tar xf vulkansdk-linux-x86_64-${{ env.SDK_VERSION_STANDALONE }}.tar.xz + + - name: Cache FFTS + uses: actions/cache@v4 + with: + path: ~/ffts + key: ${{ runner.os }}-${{ matrix.os.container }}-ffts + + - name: Clone and Build FFTS Library + run: | + [[ ${{ matrix.docs }} = 'false' ]] && export CMAKE_C_COMPILER_LAUNCHER=ccache && export CMAKE_CXX_COMPILER_LAUNCHER=ccache + if [[ ! -d ~/ffts ]]; then + cd + git clone https://github.com/anthonix/ffts.git + cd ffts + mkdir build + cd build + cmake \ + -DENABLE_SHARED=ON \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ + -GNinja \ + .. + ninja + fi + cd ~/ffts/build + ninja install + + - name: Configure + run: | + [[ (${{matrix.sdk_type }} = 'standalone') ]] && source $HOME/VulkanSDK/${{ env.SDK_VERSION_STANDALONE }}/setup-env.sh + [[ ${{ matrix.docs }} = 'false' ]] && export CMAKE_C_COMPILER_LAUNCHER=ccache && export CMAKE_CXX_COMPILER_LAUNCHER=ccache + + mkdir build + cd build + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DDISABLE_PCH=ON \ + -GNinja \ + -DCPACK_GENERATOR=DEB \ + -DCMAKE_INSTALL_PREFIX=/usr \ + .. + + - name: Build + if: ${{ ! matrix.docs }} + run: | + cd build + ninja + + - name: Build Package + if: ${{ ! matrix.docs }} + run: | + cd build + ninja package + + - name: Build Docs + if: ${{ matrix.docs }} + run: | + cd build + ninja doc + + - name: Run Tests + if: ${{ ! matrix.docs }} + run: | + export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/lvp_icd.x86_64.json + cd build + ctest --output-on-failure + + - name: Upload Artifacts + if: ${{ ! matrix.docs }} + uses: actions/upload-artifact@v4 + with: + name: ngscopeclient-${{ matrix.os.name }}-${{ matrix.os.version }}-${{ github.job }}-${{ matrix.sdk_type }} + path: | + build/src/ngscopeclient/ngscopeclient + build/src/ngscopeclient/icons/* + build/src/ngscopeclient/shaders/* + build/lib/scopehal/libscopehal.so + build/lib/scopeprotocols/libscopeprotocols.so + build/Testing/Temporary/LastTest.log + + - name: Upload Package + if: ${{ ! matrix.docs }} + uses: actions/upload-artifact@v4 + with: + name: ngscopeclient-${{ matrix.os.name }}-${{ matrix.os.version }}-${{ github.job }}-${{ matrix.sdk_type }}-package + path: build/*.deb + + - name: Upload Documentation + if: ${{ matrix.docs }} + uses: actions/upload-artifact@v4 + with: + name: ngscopeclient-${{ matrix.os.name }}-${{ matrix.os.version }}-${{ github.job }}-docs + path: build/doc/ngscopeclient-manual.pdf diff --git a/.github/workflows/build-fedora.yml b/.github/workflows/build-fedora.yml new file mode 100644 index 000000000..c56dfc0d8 --- /dev/null +++ b/.github/workflows/build-fedora.yml @@ -0,0 +1,203 @@ +name: Build-fedora + +on: + push: + pull_request: + workflow_dispatch: + +env: + SDK_VERSION_STANDALONE: 1.4.313.0 + SDK_VERSION_REPO: 1.4.313 + +jobs: + Linux: + strategy: + fail-fast: false + matrix: + os: + - name: fedora + version: 42 + container: fedora:42 + sdk_type: [repo, standalone] + docs: [false] + exclude: + - sdk_type: standalone + docs: true + + runs-on: ubuntu-latest + container: + image: ${{ matrix.os.container }} + env: + SDK_VERSION_STANDALONE: 1.4.309.0 + SDK_VERSION_REPO: 1.4.309 + + steps: + - name: Install General Dependencies + run: | + dnf upgrade -y + dnf install -y \ + git \ + ccache \ + gcc \ + g++ \ + cmake \ + make \ + pkgconf \ + cairomm-devel \ + gtk3-devel \ + libsigc++30-devel \ + yaml-cpp-devel \ + catch-devel \ + glfw-devel \ + hidapi-devel \ + ninja-build \ + fedora-packager \ + rpmdevtools \ + mesa-vulkan-drivers + + - name: Install Docs Dependencies + if: ${{ matrix.docs }} + run: | + dnf install -y \ + texlive-dvipng \ + texlive \ + texlive-tex4ht \ + texlive-makecell \ + texlive-tocloft \ + texlive-inconsolata \ + texlive-gensymb \ + texlive-newtx \ + texlive-upquote + + - name: Install Vulkan Repo Dependencies + if: ${{ (matrix.sdk_type == 'repo') }} + run: | + dnf install -y \ + vulkan-headers \ + vulkan-loader-devel \ + libshaderc-devel \ + glslang-devel \ + glslc \ + spirv-tools-devel + + - name: Check Out Code + uses: actions/checkout@v4 + with: + submodules: recursive + fetch-depth: 0 + + - name: Use CCache + if: ${{ ! matrix.docs }} + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ github.job }}-${{ matrix.os.container }}-${{ matrix.sdk_type}} + max-size: "1500M" + + - name: Cache Vulkan SDK Standalone + if: ${{ matrix.sdk_type == 'standalone' }} + uses: actions/cache@v4 + with: + path: ~/VulkanSDK + key: ${{ matrix.os.container }}-vulkansdk-${{ env.SDK_VERSION_STANDALONE }} + + - name: Install Vulkan SDK (Standalone) + if: ${{ matrix.sdk_type == 'standalone' }} + run: | + [[ -d ~/VulkanSDK/${{ env.SDK_VERSION_STANDALONE }} ]] && exit 0 + cd + mkdir VulkanSDK + cd VulkanSDK + curl -LO https://sdk.lunarg.com/sdk/download/${{ env.SDK_VERSION_STANDALONE }}/linux/vulkansdk-linux-x86_64-${{ env.SDK_VERSION_STANDALONE }}.tar.xz + tar xf vulkansdk-linux-x86_64-${{ env.SDK_VERSION_STANDALONE }}.tar.xz + + - name: Cache FFTS + uses: actions/cache@v4 + with: + path: ~/ffts + key: ${{ runner.os }}-${{ matrix.os.container }}-ffts + + - name: Clone and Build FFTS Library + run: | + [[ ${{ matrix.docs }} = 'false' ]] && export CMAKE_C_COMPILER_LAUNCHER=ccache && export CMAKE_CXX_COMPILER_LAUNCHER=ccache + if [[ ! -d ~/ffts ]]; then + cd + git clone https://github.com/anthonix/ffts.git + cd ffts + mkdir build + cd build + cmake \ + -DENABLE_SHARED=ON \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ + -GNinja \ + .. + ninja + fi + cd ~/ffts/build + sudo ninja install + + - name: Configure + run: | + [[ (${{matrix.sdk_type }} = 'standalone') ]] && source $HOME/VulkanSDK/${{ env.SDK_VERSION_STANDALONE }}/setup-env.sh + [[ ${{ matrix.docs }} = 'false' ]] && export CMAKE_C_COMPILER_LAUNCHER=ccache && export CMAKE_CXX_COMPILER_LAUNCHER=ccache + + mkdir build + cd build + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DDISABLE_PCH=ON \ + -GNinja \ + -DCPACK_GENERATOR=RPM \ + -DCMAKE_INSTALL_PREFIX=/usr \ + .. + + - name: Build + if: ${{ ! matrix.docs }} + run: | + cd build + ninja + + - name: Build Package + if: ${{ ! matrix.docs }} + run: | + cd build + ninja package + + - name: Build Docs + if: ${{ matrix.docs }} + run: | + cd build + ninja doc + + - name: Run Tests + if: ${{ ! matrix.docs }} + run: | + export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/lvp_icd.x86_64.json + cd build + ctest --output-on-failure + + - name: Upload Artifacts + if: ${{ ! matrix.docs }} + uses: actions/upload-artifact@v4 + with: + name: ngscopeclient-${{ matrix.os.name }}-${{ matrix.os.version }}-${{ github.job }}-${{ matrix.sdk_type }} + path: | + build/src/ngscopeclient/ngscopeclient + build/src/ngscopeclient/icons/* + build/src/ngscopeclient/shaders/* + build/lib/scopehal/libscopehal.so + build/lib/scopeprotocols/libscopeprotocols.so + build/Testing/Temporary/LastTest.log + + - name: Upload Package + if: ${{ ! matrix.docs }} + uses: actions/upload-artifact@v4 + with: + name: ngscopeclient-${{ matrix.os.name }}-${{ matrix.os.version }}-${{ github.job }}-${{ matrix.sdk_type }}-package + path: build/*.rpm + + - name: Upload Documentation + if: ${{ matrix.docs }} + uses: actions/upload-artifact@v4 + with: + name: ngscopeclient-${{ matrix.os.name }}-${{ matrix.os.version }}-${{ github.job }}-docs + path: build/doc/ngscopeclient-manual.pdf