skip unit test

This commit is contained in:
SoftFever
2026-01-05 00:34:46 +08:00
parent 58278596df
commit 82abc70460

View File

@@ -82,109 +82,110 @@ jobs:
build-deps-only: ${{ inputs.build-deps-only || false }} build-deps-only: ${{ inputs.build-deps-only || false }}
force-build: ${{ github.event_name == 'schedule' }} force-build: ${{ github.event_name == 'schedule' }}
secrets: inherit secrets: inherit
unit_tests: # TODO: Re-enable after auto-update testing is complete (depends on build_linux)
name: Unit Tests # unit_tests:
runs-on: ubuntu-24.04 # name: Unit Tests
needs: build_linux # runs-on: ubuntu-24.04
if: ${{ !cancelled() && success() }} # needs: build_linux
steps: # if: ${{ !cancelled() && success() }}
- name: Checkout # steps:
uses: actions/checkout@v6 # - name: Checkout
with: # uses: actions/checkout@v6
sparse-checkout: | # with:
.github # sparse-checkout: |
scripts # .github
tests # scripts
- name: Apt-Install Dependencies # tests
uses: ./.github/actions/apt-install-deps # - name: Apt-Install Dependencies
- name: Restore Test Artifact # uses: ./.github/actions/apt-install-deps
uses: actions/download-artifact@v7 # - name: Restore Test Artifact
with: # uses: actions/download-artifact@v7
name: ${{ github.sha }}-tests # with:
- uses: lukka/get-cmake@latest # name: ${{ github.sha }}-tests
with: # - uses: lukka/get-cmake@latest
cmakeVersion: "~3.28.0" # use most recent 3.28.x version # with:
- name: Unpackage and Run Unit Tests # cmakeVersion: "~3.28.0" # use most recent 3.28.x version
timeout-minutes: 20 # - name: Unpackage and Run Unit Tests
run: | # timeout-minutes: 20
tar -xvf build_tests.tar # run: |
scripts/run_unit_tests.sh # tar -xvf build_tests.tar
- name: Upload Test Logs # scripts/run_unit_tests.sh
uses: actions/upload-artifact@v6 # - name: Upload Test Logs
if: ${{ failure() }} # uses: actions/upload-artifact@v6
with: # if: ${{ failure() }}
name: unit-test-logs # with:
path: build/tests/**/*.log # name: unit-test-logs
- name: Publish Test Results # path: build/tests/**/*.log
if: always() # - name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action/linux@v2 # if: always()
with: # uses: EnricoMi/publish-unit-test-result-action/linux@v2
files: "ctest_results.xml" # with:
flatpak: # files: "ctest_results.xml"
name: "Flatpak" # flatpak:
container: # name: "Flatpak"
image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-48 # container:
options: --privileged # image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-48
volumes: # options: --privileged
- /usr/local/lib/android:/usr/local/lib/android # volumes:
- /usr/share/dotnet:/usr/share/dotnet # - /usr/local/lib/android:/usr/local/lib/android
- /opt/ghc:/opt/ghc1 # - /usr/share/dotnet:/usr/share/dotnet
- /usr/local/share/boost:/usr/local/share/boost1 # - /opt/ghc:/opt/ghc1
- /opt/hostedtoolcache:/opt/hostedtoolcache1 # - /usr/local/share/boost:/usr/local/share/boost1
strategy: # - /opt/hostedtoolcache:/opt/hostedtoolcache1
fail-fast: false # strategy:
matrix: # fail-fast: false
variant: # matrix:
- arch: x86_64 # variant:
runner: ubuntu-24.04 # - arch: x86_64
- arch: aarch64 # runner: ubuntu-24.04
runner: ubuntu-24.04-arm # - arch: aarch64
# Don't run scheduled builds on forks: # runner: ubuntu-24.04-arm
if: ${{ !cancelled() && (github.event_name != 'schedule' || github.repository == 'OrcaSlicer/OrcaSlicer') }} # # Don't run scheduled builds on forks:
runs-on: ${{ matrix.variant.runner }} # if: ${{ !cancelled() && (github.event_name != 'schedule' || github.repository == 'OrcaSlicer/OrcaSlicer') }}
env: # runs-on: ${{ matrix.variant.runner }}
date: # env:
ver: # date:
ver_pure: # ver:
steps: # ver_pure:
- name: "Remove unneeded stuff to free disk space" # steps:
run: # - name: "Remove unneeded stuff to free disk space"
rm -rf /usr/local/lib/android/* /usr/share/dotnet/* /opt/ghc1/* "/usr/local/share/boost1/*" /opt/hostedtoolcache1/* # run:
- uses: actions/checkout@v6 # rm -rf /usr/local/lib/android/* /usr/share/dotnet/* /opt/ghc1/* "/usr/local/share/boost1/*" /opt/hostedtoolcache1/*
- name: Get the version and date # - uses: actions/checkout@v6
run: | # - name: Get the version and date
ver_pure=$(grep 'set(SoftFever_VERSION' version.inc | cut -d '"' -f2) # run: |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then # ver_pure=$(grep 'set(SoftFever_VERSION' version.inc | cut -d '"' -f2)
ver="PR-${{ github.event.number }}" # if [[ "${{ github.event_name }}" == "pull_request" ]]; then
git_commit_hash="${{ github.event.pull_request.head.sha }}" # ver="PR-${{ github.event.number }}"
else # git_commit_hash="${{ github.event.pull_request.head.sha }}"
ver=V$ver_pure # else
git_commit_hash="" # ver=V$ver_pure
fi # git_commit_hash=""
echo "ver=$ver" >> $GITHUB_ENV # fi
echo "ver_pure=$ver_pure" >> $GITHUB_ENV # echo "ver=$ver" >> $GITHUB_ENV
echo "date=$(date +'%Y%m%d')" >> $GITHUB_ENV # echo "ver_pure=$ver_pure" >> $GITHUB_ENV
echo "git_commit_hash=$git_commit_hash" >> $GITHUB_ENV # echo "date=$(date +'%Y%m%d')" >> $GITHUB_ENV
shell: bash # echo "git_commit_hash=$git_commit_hash" >> $GITHUB_ENV
- uses: flatpak/flatpak-github-actions/flatpak-builder@master # shell: bash
with: # - uses: flatpak/flatpak-github-actions/flatpak-builder@master
bundle: OrcaSlicer-Linux-flatpak_${{ env.ver }}_${{ matrix.variant.arch }}.flatpak # with:
manifest-path: scripts/flatpak/io.github.softfever.OrcaSlicer.yml # bundle: OrcaSlicer-Linux-flatpak_${{ env.ver }}_${{ matrix.variant.arch }}.flatpak
cache: true # manifest-path: scripts/flatpak/io.github.softfever.OrcaSlicer.yml
arch: ${{ matrix.variant.arch }} # cache: true
upload-artifact: false # arch: ${{ matrix.variant.arch }}
- name: Upload artifacts Flatpak # upload-artifact: false
uses: actions/upload-artifact@v6 # - name: Upload artifacts Flatpak
with: # uses: actions/upload-artifact@v6
name: OrcaSlicer-Linux-flatpak_${{ env.ver }}_${{ matrix.variant.arch }}.flatpak # with:
path: '/__w/OrcaSlicer/OrcaSlicer/OrcaSlicer-Linux-flatpak_${{ env.ver }}_${{ matrix.variant.arch }}.flatpak' # name: OrcaSlicer-Linux-flatpak_${{ env.ver }}_${{ matrix.variant.arch }}.flatpak
- name: Deploy Flatpak to nightly release # path: '/__w/OrcaSlicer/OrcaSlicer/OrcaSlicer-Linux-flatpak_${{ env.ver }}_${{ matrix.variant.arch }}.flatpak'
if: github.repository == 'OrcaSlicer/OrcaSlicer' && github.ref == 'refs/heads/main' # - name: Deploy Flatpak to nightly release
uses: WebFreak001/deploy-nightly@v3.2.0 # if: github.repository == 'OrcaSlicer/OrcaSlicer' && github.ref == 'refs/heads/main'
with: # uses: WebFreak001/deploy-nightly@v3.2.0
upload_url: https://uploads.github.com/repos/OrcaSlicer/OrcaSlicer/releases/137995723/assets{?name,label} # with:
release_id: 137995723 # upload_url: https://uploads.github.com/repos/OrcaSlicer/OrcaSlicer/releases/137995723/assets{?name,label}
asset_path: /__w/OrcaSlicer/OrcaSlicer/OrcaSlicer-Linux-flatpak_${{ env.ver }}_${{ matrix.variant.arch }}.flatpak # release_id: 137995723
asset_name: OrcaSlicer-Linux-flatpak_nightly_${{ matrix.variant.arch }}.flatpak # asset_path: /__w/OrcaSlicer/OrcaSlicer/OrcaSlicer-Linux-flatpak_${{ env.ver }}_${{ matrix.variant.arch }}.flatpak
asset_content_type: application/octet-stream # asset_name: OrcaSlicer-Linux-flatpak_nightly_${{ matrix.variant.arch }}.flatpak
max_releases: 1 # optional, if there are more releases than this matching the asset_name, the oldest ones are going to be deleted # asset_content_type: application/octet-stream
# max_releases: 1 # optional, if there are more releases than this matching the asset_name, the oldest ones are going to be deleted