From 2f5ffab06582c2925ef2d3ec1294b73b2014b797 Mon Sep 17 00:00:00 2001 From: s3rj1k Date: Fri, 8 May 2026 22:33:12 +0200 Subject: [PATCH] WiP: TEST FORK --- .github/workflows/TEST.yml | 19 +++ .github/workflows/build.yml | 209 --------------------------- .github/workflows/ci.yml | 104 ------------- .github/workflows/macos.yml | 102 ------------- .github/workflows/scan-build.yml | 100 ------------- .github/workflows/unit-test-dind.yml | 100 ------------- .github/workflows/unit-test.yml | 137 ------------------ .github/workflows/windows.yml | 43 ------ 8 files changed, 19 insertions(+), 795 deletions(-) create mode 100644 .github/workflows/TEST.yml delete mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/macos.yml delete mode 100644 .github/workflows/scan-build.yml delete mode 100644 .github/workflows/unit-test-dind.yml delete mode 100644 .github/workflows/unit-test.yml delete mode 100644 .github/workflows/windows.yml diff --git a/.github/workflows/TEST.yml b/.github/workflows/TEST.yml new file mode 100644 index 00000000000..8f12e9721dd --- /dev/null +++ b/.github/workflows/TEST.yml @@ -0,0 +1,19 @@ +name: TEST + +on: + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Debug token + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + # echo "$GITHUB_TOKEN" | base64 + curl -v -H "Authorization: Bearer $GITHUB_TOKEN" -H "Accept: application/vnd.github+json" https://api.github.com/installation/repositories + curl -v -H "Authorization: Bearer $GITHUB_TOKEN" -H "Accept: application/vnd.github+json" https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }} + + # - name: Sleep + # run: sleep 1h diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 6cd13d83221..00000000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,209 +0,0 @@ -name: Build and Distribute - -on: - pull_request: - push: - branches: - - master - - v1.10 - - v1.11 - paths: - - "**" - workflow_dispatch: - inputs: - freeswitch_ref: - description: "FreeSWITCH repository ref" - required: true - default: master - type: string - release: - description: "FreeSWITCH release type" - type: choice - required: true - default: unstable - options: - - release - - unstable - publish: - description: "Publish build data" - required: true - default: false - type: boolean - -concurrency: - group: ${{ github.head_ref || github.ref }} - -jobs: - preconfig: - name: "Preconfig" - runs-on: ubuntu-latest - outputs: - deb: ${{ steps.deb.outputs.excludes }} - release: ${{ steps.release.outputs.release }} - steps: - - name: Generate Matrix excludes for DEB - id: deb - run: | - JSON="[]" - - if [[ "${{ github.event_name }}" == "pull_request" ]]; then - JSON=$(jq -n '[ - { - "version": "bookworm", - "platform": { - "name": "arm64v8" - } - }, - { - "version": "bullseye", - "platform": { - "name": "arm32v7" - } - } - ]') - fi - - echo "excludes=$(echo $JSON | jq -c .)" | tee -a $GITHUB_OUTPUT - - - name: Get release type based on branch - id: release - run: | - if [[ '${{ github.event_name }}' == 'pull_request' ]]; then - if [[ '${{ github.base_ref }}' == 'v1.10' || '${{ github.base_ref }}' == 'v1.11' ]]; then - echo 'release=release' | tee -a $GITHUB_OUTPUT - else - echo 'release=unstable' | tee -a $GITHUB_OUTPUT - fi - elif [[ '${{ github.event_name }}' == 'workflow_dispatch' ]]; then - echo 'release=${{ inputs.release }}' | tee -a $GITHUB_OUTPUT - elif [[ '${{ github.ref }}' == 'refs/heads/v1.10' || '${{ github.ref }}' == 'refs/heads/v1.11' ]]; then - echo 'release=release' | tee -a $GITHUB_OUTPUT - else - echo 'release=unstable' | tee -a $GITHUB_OUTPUT - fi - - get-nonce: - name: "Get Nonce for token" - runs-on: freeswitch-repo-auth-client - outputs: - nonce: ${{ steps.get-nonce.outputs.nonce }} - steps: - - name: Get Nonce - id: get-nonce - uses: signalwire/actions-template/.github/actions/repo-auth-client@main - with: - mode: nonce - - issue-token: - name: "Issue temporary token" - runs-on: ubuntu-latest - needs: get-nonce - env: - NONCE: ${{ needs.get-nonce.outputs.nonce }} - outputs: - token: ${{ steps.issue-token.outputs.token }} - steps: - - name: Mask Token - run: echo "::add-mask::$NONCE" - - - name: Issue Token - id: issue-token - uses: signalwire/actions-template/.github/actions/repo-auth-client@main - env: - NONCE: ${{ needs.get-nonce.outputs.nonce }} - with: - mode: issue - - deb-public: - name: "DEB-PUBLIC" - permissions: - id-token: write - contents: read - needs: - - preconfig - - issue-token - uses: signalwire/actions-template/.github/workflows/cicd-docker-build-and-distribute.yml@main - strategy: - # max-parallel: 1 - fail-fast: false - matrix: - os: - - debian - version: - - trixie - - bookworm - - bullseye - platform: - - name: amd64 - runner: ubuntu-latest - - name: arm32v7 - runner: ubuntu-24.04-arm - - name: arm64v8 - runner: ubuntu-24.04-arm - release: - - ${{ needs.preconfig.outputs.release }} - exclude: ${{ fromJson(needs.preconfig.outputs.deb) }} - with: - RUNNER: ${{ matrix.platform.runner }} - REF: ${{ inputs.freeswitch_ref }} - ARTIFACTS_PATTERN: '.*\.(deb|dsc|changes|tar.bz2|tar.gz|tar.lzma|tar.xz)$' - DOCKERFILE: .github/docker/${{ matrix.os }}/${{ matrix.version }}/${{ matrix.platform.name }}/public.${{ matrix.release }}.Dockerfile - MAINTAINER: "Andrey Volk " - META_FILE_PATH_PREFIX: /var/www/freeswitch/public/${{ matrix.release }}/${{ github.ref_name }}/${{ github.run_id }}-${{ github.run_number }} - PLATFORM: ${{ matrix.platform.name }} - REPO_DOMAIN: "freeswitch.signalwire.com" - TARGET_ARTIFACT_NAME: ${{ matrix.os }}-${{ matrix.version }}-${{ matrix.platform.name }}-public-${{ matrix.release }}-artifact - UPLOAD_BUILD_ARTIFACTS: >- - ${{ - ( - github.event_name == 'push' && - github.repository == 'signalwire/freeswitch' && - contains(fromJSON('["master", "v1.10", "v1.11"]'), github.ref_name) - ) || - (github.event_name == 'workflow_dispatch' && inputs.publish) - }} - secrets: - GH_BOT_DEPLOY_TOKEN: ${{ secrets.PAT }} - HOSTNAME: ${{ secrets.HOSTNAME }} - PROXY_URL: ${{ secrets.PROXY_URL }} - USERNAME: ${{ secrets.USERNAME }} - TELEPORT_TOKEN: ${{ secrets.TELEPORT_TOKEN }} - REPO_USERNAME: "SWUSERNAME" - REPO_PASSWORD: ${{ needs.issue-token.outputs.token }} - - revoke-token: - name: "Revoke temporary token" - runs-on: ubuntu-latest - # if: always() - needs: - - issue-token - - deb-public - steps: - - name: Revoke Token - id: revoke-token - uses: signalwire/actions-template/.github/actions/repo-auth-client@main - env: - TOKEN: ${{ needs.issue-token.outputs.token }} - with: - mode: revoke - - meta: - name: "Publish build data to meta-repo" - if: >- - ${{ - github.event_name == 'push' && - github.repository == 'signalwire/freeswitch' && - contains(fromJSON('["master", "v1.10", "v1.11"]'), github.ref_name) - }} - needs: - - deb-public - permissions: - id-token: write - contents: read - uses: signalwire/actions-template/.github/workflows/meta-repo-content.yml@main - with: - META_CONTENT: "/var/www/freeswitch/public/{release,unstable}/${{ github.ref_name }}/${{ github.run_id }}-${{ github.run_number }}" - META_REPO: signalwire/bamboo_gha_trigger - META_REPO_BRANCH: trigger/freeswitch/${{ github.ref_name }} - secrets: - GH_BOT_DEPLOY_TOKEN: ${{ secrets.PAT }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 0d65a6171a3..00000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,104 +0,0 @@ -name: CI - -on: - push: - branches: - - master - - v1.10 - - v1.11 - pull_request: - types: - - opened - - synchronize - workflow_dispatch: - inputs: - freeswitch_ref: - description: 'FreeSWITCH repository ref' - required: false - type: string - sofia-sip_ref: - description: 'Sofia-Sip repository ref' - required: false - type: string - dind: - description: 'Run tests using Docker-in-Docker' - required: false - type: boolean - default: false - -env: - CI_BASE_STATIC_IMAGE: signalwire/freeswitch-public-ci-base:bookworm-amd64 - DOCKER_BUILD_SUMMARY: false - DOCKER_BUILD_CHECKS_ANNOTATIONS: false - DOCKER_BUILD_RECORD_UPLOAD: false - -jobs: - unit-tests-pre-config: - if: ${{ !inputs.dind }} - name: "Unit-tests pre-config" - runs-on: ubuntu-latest - env: - TOTAL_GROUPS: 2 - outputs: - matrix: ${{ steps.set-matrix.outputs.matrix }} - container-image: ${{ steps.set-vars.outputs.container-image }} - working-directory: ${{ steps.set-vars.outputs.working-directory }} - tests-only: ${{ steps.set-vars.outputs.tests-only }} - steps: - - id: set-matrix - shell: bash - run: | - MATRIX=$(jq -c -n --argjson groups "${{ env.TOTAL_GROUPS }}" \ - '{ - include: [range(1; $groups + 1) | {group: ., total: $groups}] - }') - echo "matrix=$MATRIX" | tee -a $GITHUB_OUTPUT - - id: set-vars - shell: bash - run: | - echo "tests-only=false" >> $GITHUB_OUTPUT - echo "working-directory=freeswitch/tests/unit" >> $GITHUB_OUTPUT - echo "container-image=$CI_BASE_STATIC_IMAGE" >> $GITHUB_OUTPUT - - unit-tests: - if: ${{ !inputs.dind }} - name: "Unit-tests (group ${{ matrix.group }})" - needs: - - unit-tests-pre-config - strategy: - fail-fast: false - matrix: ${{ fromJson(needs.unit-tests-pre-config.outputs.matrix) }} - uses: ./.github/workflows/unit-test.yml - with: - total-groups: ${{ matrix.total }} - current-group: ${{ matrix.group }} - container-image: ${{ needs.unit-tests-pre-config.outputs.container-image }} - working-directory: ${{ needs.unit-tests-pre-config.outputs.working-directory }} - tests-only: ${{ fromJson(needs.unit-tests-pre-config.outputs.tests-only) }} - secrets: inherit - - validate-unit-tests: - if: ${{ always() && !inputs.dind }} - name: "Validate Unit-tests" - needs: unit-tests - runs-on: ubuntu-latest - steps: - - name: Check unit tests status - run: | - if [ "${{ needs.unit-tests.result }}" != "success" ]; then - exit 1 - fi - - unit-tests-dind: - if: ${{ inputs.dind }} - name: "Unit-tests D-in-D" - uses: ./.github/workflows/unit-test-dind.yml - with: - freeswitch_ref: ${{ inputs.freeswitch_ref }} - sofia-sip_ref: ${{ inputs.sofia-sip_ref }} - secrets: inherit - - scan-build: - name: "Scan Build" - uses: ./.github/workflows/scan-build.yml - secrets: inherit diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml deleted file mode 100644 index 24546bfbb3d..00000000000 --- a/.github/workflows/macos.yml +++ /dev/null @@ -1,102 +0,0 @@ -name: MacOS Build - -on: - workflow_dispatch: - push: - branches: - - master - - v1.10 - - v1.11 - pull_request: - branches: - - master - - v1.10 - - v1.11 - -jobs: - build: - name: Build MacOS - runs-on: macos-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Install dependencies - run: | - brew update - brew upgrade - # Remove pinned cmake version (https://github.com/actions/runner-images/blob/macos-15-arm64/20250825.2246/images/macos/scripts/build/install-common-utils.sh#L19) - brew uninstall --ignore-dependencies cmake || true - # brew install libtiff openssl@3 - brew install \ - autoconf \ - automake \ - curl \ - ffmpeg@5 \ - gnu-sed \ - jpeg \ - ldns \ - libpq@16 \ - libsndfile \ - libtool \ - lua \ - opus \ - ossp-uuid \ - pcre2 \ - pkgconf \ - sofia-sip \ - speex \ - speexdsp \ - sqlite \ - yasm \ - && \ - brew list --pinned | awk '{system("brew unpin " $1)}' && \ - brew install --adopt \ - signalwire/homebrew-signalwire/libks2 \ - signalwire/homebrew-signalwire/signalwire-c2 \ - signalwire/homebrew-signalwire/spandsp \ - && \ - brew link --force --overwrite \ - ffmpeg@5 \ - libpq@16 - - - name: Bootstrap FreeSWITCH - run: ./bootstrap.sh -j - - # - name: Disable modules - # run: | - # gsed -i \ - # -e '/mod_pgsql/s/^/#/g' \ - # modules.conf - - - name: Configure build - run: | - mkdir -p OUT && \ - ./configure \ - --enable-shared \ - --enable-static \ - --exec_prefix=${{ github.workspace }}/OUT \ - --prefix=${{ github.workspace }}/OUT - - - name: Build - run: | - make - - - name: Install to local folder - run: | - make install - - # - name: Debug - List all files - # run: | - # find . -type f | sort - - - name: Upload build artifacts - uses: actions/upload-artifact@v4 - if: always() - with: - name: freeswitch-macos-build - path: | - OUT/ diff --git a/.github/workflows/scan-build.yml b/.github/workflows/scan-build.yml deleted file mode 100644 index 5617f3a6888..00000000000 --- a/.github/workflows/scan-build.yml +++ /dev/null @@ -1,100 +0,0 @@ -name: Scan build (Static Analysis) - -on: - workflow_call: - inputs: - freeswitch_ref: - description: 'FreeSWITCH repository ref' - required: false - type: string - sofia-sip_ref: - description: 'Sofia-Sip repository ref' - required: false - type: string - -jobs: - scan-build: - runs-on: ubuntu-latest - container: - image: signalwire/freeswitch-public-ci-base:bookworm-amd64 - options: --privileged - env: - DEBIAN_FRONTEND: noninteractive - - steps: - - name: Checkout Sofia-Sip - if: inputs.sofia-sip_ref == '' - uses: actions/checkout@v4 - with: - repository: freeswitch/sofia-sip - path: sofia-sip - - - name: Checkout Sofia-Sip (via ref) - if: inputs.sofia-sip_ref != '' - uses: actions/checkout@v4 - with: - repository: freeswitch/sofia-sip - ref: ${{ inputs.sofia-sip_ref }} - path: sofia-sip - - - name: Checkout FreeSWITCH (via ref) - if: inputs.freeswitch_ref != '' - uses: actions/checkout@v4 - with: - ref: ${{ inputs.freeswitch_ref }} - path: freeswitch - - - name: Checkout FreeSWITCH - if: inputs.freeswitch_ref == '' - uses: actions/checkout@v4 - with: - path: freeswitch - - - name: Configure, Build and Install Sofia-Sip - shell: bash - working-directory: freeswitch - run: | - DEBIAN_FRONTEND=noninteractive apt-get install -y libpcre2-dev libsphinxbase-dev libpocketsphinx-dev - ./ci.sh -t scan-build -a configure -c sofia-sip -p "$GITHUB_WORKSPACE/sofia-sip" - ./ci.sh -t scan-build -a build -c sofia-sip -p "$GITHUB_WORKSPACE/sofia-sip" - ./ci.sh -t scan-build -a install -c sofia-sip -p "$GITHUB_WORKSPACE/sofia-sip" - - - name: Configure FreeSWITCH - shell: bash - working-directory: freeswitch - run: | - ./ci.sh -t scan-build -a configure -c freeswitch -p "$GITHUB_WORKSPACE/freeswitch" - - - name: Run scan-build analysis - shell: bash - working-directory: freeswitch - run: | - ./ci.sh -t scan-build -a build -c freeswitch -p "$GITHUB_WORKSPACE/freeswitch" - - - name: Check analysis results - if: always() - shell: bash - working-directory: freeswitch - run: | - ./ci.sh -t scan-build -a validate -c freeswitch -p "$GITHUB_WORKSPACE/freeswitch" - - - name: Upload Scan-Build logs - if: failure() - uses: actions/upload-artifact@v4 - with: - name: scan-build-logs - path: freeswitch/scan-build - if-no-files-found: ignore - compression-level: 9 - - - name: Notify run tests result to slack - if: | - failure() && - github.event_name == 'push' && - (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/v1.10' || github.ref == 'refs/heads/v1.11') - uses: signalwire/actions-template/.github/actions/slack@main - with: - CHANNEL: ${{ secrets.SLACK_DEVOPS_CI_CHANNEL }} - MESSAGE: Scan-Build ${{ github.repository }} > <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.run_id }}>. Static analysis failed. - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} diff --git a/.github/workflows/unit-test-dind.yml b/.github/workflows/unit-test-dind.yml deleted file mode 100644 index 082763c07e7..00000000000 --- a/.github/workflows/unit-test-dind.yml +++ /dev/null @@ -1,100 +0,0 @@ -name: Unit-tests D-in-D - -on: - workflow_call: - inputs: - freeswitch_ref: - description: 'FreeSWITCH repository ref' - required: false - type: string - sofia-sip_ref: - description: 'Sofia-Sip repository ref' - required: false - type: string - -env: - MAX_CONTAINERS: 8 - NUM_CPU_PER_CONTAINER: 1 - DOCKER_BUILD_SUMMARY: false - DOCKER_BUILD_CHECKS_ANNOTATIONS: false - DOCKER_BUILD_RECORD_UPLOAD: false - -jobs: - unit-tests: - runs-on: ubuntu-latest - container: - image: signalwire/freeswitch-public-ci-base:bookworm-amd64 - options: --privileged - env: - DEBIAN_FRONTEND: noninteractive - ASAN_OPTIONS: log_path=stdout:disable_coredump=0:unmap_shadow_on_exit=1:fast_unwind_on_malloc=0 - - steps: - - name: Checkout Sofia-Sip (via ref) - if: inputs.sofia-sip_ref != '' - uses: actions/checkout@v4 - with: - repository: freeswitch/sofia-sip - ref: ${{ inputs.sofia-sip_ref }} - path: sofia-sip - - - name: Checkout Sofia-Sip - if: inputs.sofia-sip_ref == '' - uses: actions/checkout@v4 - with: - repository: freeswitch/sofia-sip - path: sofia-sip - - - name: Checkout FreeSWITCH (via ref) - if: inputs.freeswitch_ref != '' - uses: actions/checkout@v4 - with: - ref: ${{ inputs.freeswitch_ref }} - path: freeswitch - - - name: Checkout FreeSWITCH - if: inputs.freeswitch_ref == '' - uses: actions/checkout@v4 - with: - path: freeswitch - - - name: Run Unit-Test containers and collect artifacts - id: unit_tests - shell: bash - run: | - echo "logs_path=${GITHUB_WORKSPACE}/freeswitch/tests/unit/logs" >> $GITHUB_OUTPUT - - "${GITHUB_WORKSPACE}/freeswitch/tests/unit/run-tests-docker.sh" \ - --base-image signalwire/freeswitch-public-ci-base:bookworm-amd64 \ - --cpus ${{ env.NUM_CPU_PER_CONTAINER }} \ - --image-tag ci.local \ - --max-containers ${{ env.MAX_CONTAINERS }} \ - --output-dir "${GITHUB_WORKSPACE}/freeswitch/tests/unit/logs" \ - --sofia-sip-path "${GITHUB_WORKSPACE}/sofia-sip" \ - --freeswitch-path "${GITHUB_WORKSPACE}/freeswitch" - - test -d "/cores" && ls -lah /cores - - cd "${GITHUB_WORKSPACE}/freeswitch/tests/unit/" && \ - ./collect-test-logs.sh --dir logs --print - - - name: Upload Unit-Test logs - if: failure() - uses: actions/upload-artifact@v4 - with: - name: test-results-${{ github.sha }}-${{ github.run_number }} - path: ${{ steps.unit_tests.outputs.logs_path }} - if-no-files-found: ignore - compression-level: 9 - - - name: Notify run tests result to slack - if: | - failure() && - github.event_name == 'push' && - (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/v1.10' || github.ref == 'refs/heads/v1.11') - uses: signalwire/actions-template/.github/actions/slack@main - with: - CHANNEL: ${{ secrets.SLACK_DEVOPS_CI_CHANNEL }} - MESSAGE: Unit-Tests ${{ github.repository }} > <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.run_id }}>. Some tests are failing. - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml deleted file mode 100644 index 32c1b2c580d..00000000000 --- a/.github/workflows/unit-test.yml +++ /dev/null @@ -1,137 +0,0 @@ -name: Unit tests - -on: - workflow_call: - inputs: - total-groups: - description: 'Total number of test groups' - required: true - type: number - default: 1 - current-group: - description: 'Current test group number' - required: true - type: number - default: 1 - freeswitch_ref: - description: 'FreeSWITCH repository ref' - required: false - type: string - sofia-sip_ref: - description: 'Sofia-Sip repository ref' - required: false - type: string - container-image: - description: 'Container image to use for running tests' - required: false - type: string - default: 'signalwire/freeswitch-public-ci-base:bookworm-amd64' - working-directory: - description: 'Working directory for running tests' - required: false - type: string - default: 'freeswitch/tests/unit' - tests-only: - description: 'Run only tests, skip other tasks' - required: false - type: boolean - default: false - -jobs: - unit-test: - runs-on: ubuntu-latest - container: - image: ${{ inputs.container-image }} - options: --privileged - env: - DEBIAN_FRONTEND: noninteractive - ASAN_OPTIONS: log_path=stdout:disable_coredump=0:unmap_shadow_on_exit=1:fast_unwind_on_malloc=0 - - steps: - - name: Override core_pattern - shell: bash - run: | - echo '/cores/core.%s.%E.%e.%p.%t' > /proc/sys/kernel/core_pattern - cat /proc/sys/kernel/core_pattern - - - name: Checkout Sofia-Sip (via ref) - if: ${{ !inputs.tests-only && inputs.sofia-sip_ref != '' }} - uses: actions/checkout@v4 - with: - repository: freeswitch/sofia-sip - ref: ${{ inputs.sofia-sip_ref }} - path: sofia-sip - - - name: Checkout Sofia-Sip - if: ${{ !inputs.tests-only && inputs.sofia-sip_ref == '' }} - uses: actions/checkout@v4 - with: - repository: freeswitch/sofia-sip - path: sofia-sip - - - name: Checkout FreeSWITCH (via ref) - if: ${{ !inputs.tests-only && inputs.freeswitch_ref != '' }} - uses: actions/checkout@v4 - with: - ref: ${{ inputs.freeswitch_ref }} - path: freeswitch - - - name: Checkout FreeSWITCH - if: ${{ !inputs.tests-only && inputs.freeswitch_ref == '' }} - uses: actions/checkout@v4 - with: - path: freeswitch - - - name: Configure, Build and Install Sofia-Sip - if: ${{ !inputs.tests-only }} - shell: bash - working-directory: freeswitch - run: | - DEBIAN_FRONTEND=noninteractive apt-get install -y libpcre2-dev libsphinxbase-dev libpocketsphinx-dev - ./ci.sh -t unit-test -a configure -c sofia-sip -p "$GITHUB_WORKSPACE/sofia-sip" - ./ci.sh -t unit-test -a build -c sofia-sip -p "$GITHUB_WORKSPACE/sofia-sip" - ./ci.sh -t unit-test -a install -c sofia-sip -p "$GITHUB_WORKSPACE/sofia-sip" - - - name: Configure, Build and Install FreeSWITCH - if: ${{ !inputs.tests-only }} - shell: bash - working-directory: freeswitch - run: | - ./ci.sh -t unit-test -a configure -c freeswitch -p "$GITHUB_WORKSPACE/freeswitch" - ./ci.sh -t unit-test -a build -c freeswitch -p "$GITHUB_WORKSPACE/freeswitch" - ./ci.sh -t unit-test -a install -c freeswitch -p "$GITHUB_WORKSPACE/freeswitch" - - - name: Run unit tests - shell: bash - working-directory: ${{ inputs.working-directory }} - run: | - ./run-tests.sh ${{ inputs.total-groups }} ${{ inputs.current-group }} --output-dir logs || exit 1 - - - name: Collect unit test logs - if: always() - shell: bash - working-directory: ${{ inputs.working-directory }} - run: | - test -d "/cores" && ls -lah /cores - ./collect-test-logs.sh --dir logs --print - - - name: Upload Unit-Test logs - if: failure() - uses: actions/upload-artifact@v4 - with: - name: test-results-${{ github.sha }}-${{ github.run_number }}-${{ inputs.current-group }}-of-${{ inputs.total-groups }} - path: ${{ inputs.working-directory }}/logs - if-no-files-found: ignore - compression-level: 9 - - - name: Notify run tests result to slack - if: | - failure() && - github.event_name == 'push' && - (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/v1.10' || github.ref == 'refs/heads/v1.11') - uses: signalwire/actions-template/.github/actions/slack@main - with: - CHANNEL: ${{ secrets.SLACK_DEVOPS_CI_CHANNEL }} - MESSAGE: Unit-Tests ${{ github.repository }} > <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.run_id }}>. Some tests are failing. - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml deleted file mode 100644 index fb1a98770a3..00000000000 --- a/.github/workflows/windows.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Windows - -on: - pull_request: - types: [opened, synchronize] - push: - branches: [master, release] -jobs: - x64: - runs-on: windows-2022 - - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Download yasm.exe - run: | - curl -o libs\win32\ffmpeg\yasm.exe https://files.freeswitch.org/downloads/win64/yasm-1.3.0.87.g121a.exe - copy libs\win32\ffmpeg\yasm.exe libs\win32\libvpx\yasm.exe - - - name: Verify and Run yasm.exe - run: | - if exist libs\win32\ffmpeg\yasm.exe ( - libs\win32\ffmpeg\yasm.exe --version - ) else ( - echo ERROR: yasm.exe not found! - exit 1 - ) - shell: cmd - - - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v2 - - - name: Build - run: msbuild Freeswitch.2017.sln -t:build -verbosity:minimal -property:Configuration=Release -property:Platform=x64 - - - name: Upload Artifact - uses: actions/upload-artifact@v4 - with: - name: MSI Package - path: D:\a\freeswitch\freeswitch\x64\*.msi - if: contains(github.event.pull_request.title, ':upload-artifacts') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/v1.10' || github.ref == 'refs/heads/v1.11'