Sergey Safarov преди 5 месеца
родител
ревизия
5a32218ad8

+ 0 - 179
.github/workflows/alpine.yml

@@ -1,179 +0,0 @@
----
-name: alpine docker image
-on:
-  schedule:
-  - cron: '41 3 * * *'
-  push:
-    tags:
-    - '[0-9]+.[0-9]+.[0-9]+'
-  # Allows you to run this workflow manually from the Actions tab
-  workflow_dispatch:
-
-env:
-  IMAGE_NAME: kamailio-ci
-  SOURCE_BRANCH: ${{ github.ref_name }}
-  DOCKER_REPO: ghcr.io/kamailio/kamailio-ci
-
-jobs:
-  # is required nightly build?
-  # More info at https://stackoverflow.com/questions/63014786/how-to-schedule-a-github-actions-nightly-build-but-run-it-only-when-there-where
-  check:
-    runs-on: ubuntu-latest
-    permissions:
-      contents: read
-    steps:
-      - uses: octokit/[email protected]
-        id: check_last_run
-        with:
-          route: GET /repos/{owner}/{repo}/actions/workflows/alpine.yml/runs?per_page=1&status=success
-          owner: ${{ github.repository_owner }}
-          repo: kamailio
-        env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-      - name: Show last execution info
-        run: |
-          echo "Last daily build: ${{ fromJson(steps.check_last_run.outputs.data).workflow_runs[0].head_sha }}"
-    outputs:
-      last_sha: ${{ fromJson(steps.check_last_run.outputs.data).workflow_runs[0].head_sha }}
-  x86_64:
-    needs: [check]
-    if: needs.check.outputs.last_sha != github.sha
-    runs-on: ubuntu-latest
-    permissions:
-      contents: read
-      packages: write
-    steps:
-    - uses: actions/checkout@v4
-
-    - name: print latest_commit
-      run: echo ${{ github.sha }}
-
-    - name: Login to GitHub Container Registry
-      uses: docker/login-action@v3
-      with:
-        registry: ghcr.io
-        username: ${{ github.repository_owner }}
-        password: ${{ secrets.GITHUB_TOKEN }}
-
-    - name: Compile Kamailio source
-      run: |
-        git submodule init
-        git submodule update
-        cd pkg/docker/alpine
-        ./hooks/pre_build || true
-
-    - name: Docker meta
-      id: meta
-      uses: docker/metadata-action@v5
-      with:
-        # list of Docker images to use as base name for tags
-        images: |
-          ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}
-        # generate Docker tags based on the following events/attributes
-        tags: |
-          type=pep440,pattern={{version}}
-          type=pep440,pattern={{major}}.{{minor}}
-          type=pep440,pattern={{major}}
-          type=ref,event=branch
-        flavor: |
-          suffix=
-          latest=auto
-
-    - name: Docker meta "-alpine"
-      id: meta-alpine
-      uses: docker/metadata-action@v5
-      with:
-        # list of Docker images to use as base name for tags
-        images: |
-          ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}
-        # generate Docker tags based on the following events/attributes
-        tags: |
-          type=pep440,pattern={{version}}
-          type=pep440,pattern={{major}}.{{minor}}
-          type=pep440,pattern={{major}}
-          type=ref,event=branch
-        flavor: |
-          suffix=-alpine
-          latest=false
-
-    - name: Docker meta "-debug"
-      id: meta-debug
-      uses: docker/metadata-action@v5
-      with:
-        # list of Docker images to use as base name for tags
-        images: |
-          ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}
-        # generate Docker tags based on the following events/attributes
-        tags: |
-          type=pep440,pattern={{version}}
-          type=pep440,pattern={{major}}.{{minor}}
-          type=pep440,pattern={{major}}
-          type=ref,event=branch
-        flavor: |
-          suffix=-debug
-          latest=false
-
-    - name: temporal workarround for "-alpine" and "-debug" builds
-      run: |
-        sudo chown -R ${USER}:${USER} ${{ github.workspace }}/pkg/docker/alpine
-        cd pkg/docker/alpine
-        mkdir repackage
-        tar xz --directory=repackage -f kamailio_min-without_os_files.tar.gz
-        rm -f kamailio_min-without_os_files.tar.gz
-        tar cz --directory=repackage -f kamailio_min-without_os_files.tar.gz $(ls -A repackage)
-
-    - name: Prepare local repo for "-debug" build
-      run: |
-        docker network create kamailio-build
-        docker run \
-               --detach \
-               --network kamailio-build \
-               --name local-repo \
-               --hostname local-repo \
-               --rm=true \
-               --volume=${{ github.workspace }}/pkg/docker/alpine/apk_files:/usr/share/nginx/html:ro \
-               nginx
-        LOCAL_REPO_IP=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' local-repo)
-        sed -i -e "s/local-repo/${LOCAL_REPO_IP}/" pkg/docker/alpine/Dockerfile.debug
-
-    - name: Create custom builder for "-debug" build
-      id: local-repo
-      uses: docker/setup-buildx-action@v3
-      with:
-        driver-opts: |
-          network=kamailio-build
-
-    - name: Build and push "-debug" build
-      uses: docker/build-push-action@v6
-      with:
-        context: pkg/docker/alpine
-        file: pkg/docker/alpine/Dockerfile.debug
-        builder: ${{ steps.local-repo.outputs.name }}
-        push: ${{ github.event_name != 'pull_request' }}
-        tags: ${{ steps.meta-debug.outputs.tags }}
-        labels: ${{ steps.meta-debug.outputs.labels }}
-
-    - name: Cleanup after "-debug" build
-      run: |
-        docker buildx stop ${{ steps.local-repo.outputs.name }}
-        docker buildx rm ${{ steps.local-repo.outputs.name }}
-        docker stop local-repo
-        docker network rm kamailio-build
-
-    - name: Build and push "-alpine" build
-      uses: docker/build-push-action@v6
-      with:
-        context: pkg/docker/alpine
-        file: pkg/docker/alpine/Dockerfile.alpine
-        push: ${{ github.event_name != 'pull_request' }}
-        tags: ${{ steps.meta-alpine.outputs.tags }}
-        labels: ${{ steps.meta-alpine.outputs.labels }}
-
-    - name: Build and push
-      uses: docker/build-push-action@v6
-      with:
-        context: pkg/docker/alpine
-        file: pkg/docker/alpine/Dockerfile
-        push: ${{ github.event_name != 'pull_request' }}
-        tags: ${{ steps.meta.outputs.tags }}
-        labels: ${{ steps.meta.outputs.labels }}

+ 0 - 34
.github/workflows/cifuzz.yml

@@ -1,34 +0,0 @@
-name: CIFuzz
-on:
-  pull_request:
-    branches: [ "master" ]
-  schedule:
-    - cron: "30 0 * * *"
-  # Allows you to run this workflow manually from the Actions tab
-  workflow_dispatch:
-jobs:
-  Fuzzing:
-    runs-on: ubuntu-latest
-    permissions:
-      contents: read
-    steps:
-    - name: Build Fuzzers
-      id: build
-      uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
-      with:
-        oss-fuzz-project-name: 'kamailio'
-        dry-run: false
-        language: c
-    - name: Run Fuzzers
-      uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
-      with:
-        oss-fuzz-project-name: 'kamailio'
-        fuzz-seconds: 600
-        dry-run: false
-        language: c
-    - name: Upload Crash
-      uses: actions/upload-artifact@v4
-      if: failure() && steps.build.outcome == 'success'
-      with:
-        name: artifacts
-        path: ./out/artifacts

+ 0 - 72
.github/workflows/cmake_build.yml

@@ -1,72 +0,0 @@
-# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform.
-# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml
-name: CMake on multiple platforms
-
-on:
-  # Allows you to run this workflow manually from the Actions tab
-  workflow_dispatch:
-  push:
-    branches: [ master ]
-  pull_request:
-    branches: [ master ]
-
-jobs:
-  build:
-    runs-on: ${{ matrix.os }}
-
-    strategy:
-      # Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
-      fail-fast: false
-
-      # Set up a matrix to run the following 6 configurations:
-      # 1. <Linux, Release, latest GCC compiler toolchain on the default runner image, default generator>
-      # 2. <Linux, Release, latest Clang compiler toolchain on the default runner image, default generator>
-      # 3. <Linux, Release, latest GCC compiler toolchain on the default runner image, cross-compiled for aarch64>
-      # 4. <Linux, Release, latest Clang compiler toolchain on the default runner image, cross-compiled for aarch64>
-      # 5. <MacOS, Release, latest GCC compiler toolchain on the default runner image, default generator>
-      # 6. <MacOS, Release, latest Clang compiler toolchain on the default runner image, default generator>
-      matrix:
-        os: [ubuntu-latest, macos-latest]
-        # To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list.
-        build_type: [Release]
-        c_compiler: [gcc, clang] 
-        kamailio_groups: [DEFAULT]
-        target_arch: [aarch64, x86_64]
-        exclude:
-          # Exclude combinations that are not supported
-          - os: macos-latest
-            target_arch: x86_64
-
-    steps:
-    - name: Checkout repository
-      uses: actions/checkout@v4
-
-
-    - name: Install cross-compiler
-      if: matrix.os == 'ubuntu-latest' && matrix.target_arch == 'aarch64'
-      run: |
-        sudo apt update
-        sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
-
-    - name: Build Project natively
-      uses: threeal/[email protected]
-      # Step runs for all except this combination
-      if: matrix.os != 'ubuntu-latest' || matrix.target_arch != 'aarch64'  
-      with:
-        build-dir: ${{github.workspace}}/build
-        build-args: -j8
-        options: |
-          CMAKE_BUILD_TYPE=${{matrix.build_type}}
-          MODULE_GROUP_NAME=${{matrix.kamailio_groups}}
-          CMAKE_C_COMPILER=${{matrix.c_compiler}}
-      
-    - name: Build Project with cross-compiler
-      if: matrix.os == 'ubuntu-latest' && matrix.target_arch == 'aarch64'
-      uses: threeal/[email protected]
-      with:
-        build-dir: ${{github.workspace}}/build
-        build-args: -j8
-        options: |
-          CMAKE_BUILD_TYPE=${{matrix.build_type}}
-          MODULE_GROUP_NAME=${{matrix.kamailio_groups}}
-          CMAKE_TOOLCHAIN_FILE=${{github.workspace}}/cmake/aarch64-toolchain.cmake

+ 0 - 83
.github/workflows/codeql.yml

@@ -1,83 +0,0 @@
-name: "CodeQL"
-
-on:
-  schedule:
-    - cron: "30 0 * * *"
-  # Allows you to run this workflow manually from the Actions tab
-  workflow_dispatch:
-jobs:
-  # is required nightly build?
-  # More info at https://stackoverflow.com/questions/63014786/how-to-schedule-a-github-actions-nightly-build-but-run-it-only-when-there-where
-  check:
-    runs-on: ubuntu-latest
-    permissions:
-      contents: read
-    steps:
-      - uses: octokit/[email protected]
-        id: check_last_run
-        with:
-          route: GET /repos/{owner}/{repo}/actions/workflows/codeql.yml/runs?per_page=1&status=success
-          owner: ${{ github.repository_owner }}
-          repo: kamailio
-        env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-      - name: Show last execution info
-        run: |
-          echo "Last daily build: ${{ fromJson(steps.check_last_run.outputs.data).workflow_runs[0].head_sha }}"
-    outputs:
-      last_sha: ${{ fromJson(steps.check_last_run.outputs.data).workflow_runs[0].head_sha }}
-  analyze:
-    needs: [check]
-    if: needs.check.outputs.last_sha != github.sha
-    name: Analyze
-    runs-on: [self-hosted, linux, x64, codeql]
-    permissions:
-      actions: read
-      contents: read
-      security-events: write
-
-    strategy:
-      fail-fast: false
-      matrix:
-        language: [ javascript, cpp, python ]
-
-    container:
-      image: ghcr.io/kamailio/pkg-kamailio-docker:${{ github.ref_name }}-bookworm
-      credentials:
-        username: ${{ github.actor }}
-        password: ${{ secrets.GITHUB_TOKEN }}
-      volumes:
-        - ${{ github.workspace }}:/code
-
-    steps:
-      - name: Checkout
-        uses: actions/checkout@v4
-        with:
-          submodules: recursive
-
-      - name: Configure (cpp)
-        if: ${{ matrix.language == 'cpp' }}
-        run: make include_modules='app_lua app_python3 cnxcc db_mysql db_postgres db_redis dialplan http_client jansson lcr ndb_redis presence presence_xml presence_dialoginfo pua pua_dialoginfo topos_redis uuid websocket xmlops' cfg
-
-      - name: After Prepare (cpp)
-        if: ${{ matrix.language == 'cpp' }}
-        run: export PKG_CONFIG_PATH=$RUNNER_TEMP/usr/lib/pkgconfig:$PKG_CONFIG_PATH && echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> $GITHUB_ENV
-
-      - name: Initialize CodeQL
-        uses: github/codeql-action/init@v3
-        with:
-          languages: ${{ matrix.language }}
-          queries: +security-and-quality
-
-      - name: Autobuild
-        uses: github/codeql-action/autobuild@v3
-        if: ${{ matrix.language == 'javascript' || matrix.language == 'python' }}
-
-      - name: Build cpp
-        if: ${{ matrix.language == 'cpp' }}
-        run: make -j$(nproc) all
-
-      - name: Perform CodeQL Analysis
-        uses: github/codeql-action/analyze@v3
-        with:
-          category: "/language:${{ matrix.language }}"

+ 0 - 63
.github/workflows/devcontainer.yaml

@@ -1,63 +0,0 @@
-
----
-name: build devcontainer image
-'on':
-  push:
-    branches:
-      - master
-  # Allows you to run this workflow manually from the Actions tab
-  workflow_dispatch:
-    inputs:
-      force:
-        required: true
-        type: boolean
-        default: false
-
-env:
-  DIST: bookworm
-
-jobs:
-  build:
-    runs-on: ubuntu-latest
-    permissions:
-      contents: read
-      packages: write
-    steps:
-      - uses: actions/checkout@v4
-        with:
-          fetch-depth: 2
-
-      - name: print latest_commit
-        run: echo ${{ github.sha }}
-
-      - name: Get changed files
-        if: ${{ ! inputs.force }}
-        id: changed-files
-        uses: tj-actions/changed-files@v46
-        with:
-          since_last_remote_commit: true
-
-      - name: changes in relevant files
-        if: ${{ ! inputs.force }}
-        id: changed-files-builder
-        uses: tj-actions/changed-files@v46
-        with:
-          files: |
-            .devcontainer/**
-            pkg/kamailio/deb/${{ env.DIST }}/**
-
-      - name: Login to GitHub Container Registry
-        if: steps.changed-files-builder.outputs.any_changed == 'true' || inputs.force
-        uses: docker/login-action@v3
-        with:
-          registry: ghcr.io
-          username: ${{ github.repository_owner }}
-          password: ${{ secrets.GITHUB_TOKEN }}
-
-      - name: Pre-build dev container image
-        if: steps.changed-files-builder.outputs.any_changed == 'true' || inputs.force
-        uses: devcontainers/[email protected]
-        with:
-          imageName: ghcr.io/${{ github.repository_owner }}/kamailio-${{ github.ref_name }}-devcontainer
-          cacheFrom: ghcr.io/${{ github.repository_owner }}/kamailio-${{ github.ref_name }}-devcontainer
-          push: always

+ 0 - 25
.github/workflows/issue_management.yml

@@ -1,25 +0,0 @@
-name: 'Close stale issues and PRs'
-on:
-  schedule:
-    - cron: '30 2 * * *'
-  # Allows you to run this workflow manually from the Actions tab
-  workflow_dispatch:
-permissions:
-  issues: write
-  pull-requests: write
-jobs:
-  stale:
-    runs-on: ubuntu-latest
-    steps:
-      - uses: actions/stale@v9
-        with:
-          stale-issue-message: 'This issue is stale because it has been open 6 weeks with no activity. Remove stale label or comment or this will be closed in 2 weeks.'
-          stale-pr-message: 'This PR is stale because it has been open 6 weeks with no activity. Remove stale label or comment or this will be closed in 2 weeks.'
-          days-before-stale: 42
-          days-before-close: 14
-          close-issue-label: expired
-          close-pr-label: expired
-          exempt-issue-labels: bug
-          remove-stale-when-updated: true
-          operations-per-run: 500
-          ascending: true

+ 0 - 54
.github/workflows/labels.yml

@@ -1,54 +0,0 @@
-name: manage labels from comments
-
-on: [issue_comment]
-
-jobs:
-  manage:
-    runs-on: ubuntu-latest
-    steps:
-      - uses: actions/github-script@v7
-        if: ${{ contains(github.event.comment.body, '/notstale') }}
-        with:
-          script: |
-            github.rest.issues.removeLabel({
-              owner: context.repo.owner,
-              repo: context.repo.repo,
-              issue_number:context.issue.number,
-              name: "stale",
-            });
-      - uses: actions/github-script@v7
-        if: ${{ !github.event.issue.pull_request && contains(github.event.comment.body, '/notexpired') }}
-        with:
-          script: |
-            github.rest.issues.update({
-              owner: context.repo.owner,
-              repo: context.repo.repo,
-              issue_number: context.issue.number,
-              state: "open",
-            });
-      - uses: actions/github-script@v7
-        if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, '/notexpired') }}
-        with:
-          script: |
-            github.rest.pulls.update({
-              owner: context.repo.owner,
-              repo: context.repo.repo,
-              pull_number: context.issue.number,
-              state: "open",
-            });
-      - uses: actions/github-script@v7
-        if: ${{ contains(github.event.comment.body, '/notexpired') }}
-        with:
-          script: |
-            github.rest.issues.removeLabel({
-              owner: context.repo.owner,
-              repo: context.repo.repo,
-              issue_number: context.issue.number,
-              name: "stale",
-            });
-            github.rest.issues.removeLabel({
-              owner: context.repo.owner,
-              repo: context.repo.repo,
-              issue_number: context.issue.number,
-              name: "expired",
-            });

+ 0 - 42
.github/workflows/main.yml

@@ -1,42 +0,0 @@
----
-name: build
-'on':
-  push:
-    branches:
-      - master
-  # Allows you to run this workflow manually from the Actions tab
-  workflow_dispatch:
-jobs:
-  build:
-    runs-on: ubuntu-latest
-    permissions:
-      contents: read # to fetch code (actions/checkout)
-    container:
-      image: ghcr.io/kamailio/pkg-kamailio-docker:${{ github.ref_name }}-${{ matrix.distribution }}
-      credentials:
-        username: ${{ github.actor }}
-        password: ${{ secrets.GITHUB_TOKEN }}
-      volumes:
-        - ${{ github.workspace }}:/code
-      env:
-        DIST: ${{ matrix.distribution }}
-        CC: ${{ matrix.compilier }}
-    strategy:
-      matrix:
-        include:
-          - distribution: bookworm
-            compilier: gcc
-          - distribution: bookworm
-            compilier: clang
-          - distribution: sid
-            compilier: gcc
-          - distribution: sid
-            compilier: clang
-    steps:
-      - uses: actions/checkout@v4
-      - uses: ammaraskar/[email protected]
-      - name: build
-        run: |
-          cd /code
-          ./test/travis/build_travis.sh
-        shell: bash

+ 0 - 79
.github/workflows/pull_request.yml

@@ -1,79 +0,0 @@
----
-name: checks_pr
-'on':
-  pull_request:
-    branches:
-      - master
-  # Allows you to run this workflow manually from the Actions tab
-  workflow_dispatch:
-jobs:
-  check-format:
-    runs-on: ubuntu-latest
-    permissions:
-      contents: read # to fetch code (actions/checkout)
-    steps:
-      - name: Check out the repository to the runner
-        uses: actions/checkout@v4
-      - name: Run clang-format check
-        uses: wolletd/[email protected]
-        with:
-          target-ref: master
-  check-cmake-format:
-    runs-on: ubuntu-latest
-    permissions:
-      contents: read # to fetch code (actions/checkout)
-    steps:
-      - name: Check out the repository to the runner
-        uses: actions/checkout@v4
-        with:
-          ref: ${{ github.event.pull_request.head.sha }}
-      - uses: awalsh128/[email protected]
-        with:
-          packages: cmake-format
-      - name: Run scripts/check-cmake-format.sh
-        run: ./.github/scripts/check-cmake-format.sh
-        env:
-          ref: ${{ github.event.pull_request.head.sha }}
-  check-commit:
-    runs-on: ubuntu-latest
-    permissions:
-      contents: read # to fetch code (actions/checkout)
-    steps:
-      - name: Check out the repository to the runner
-        uses: actions/checkout@v4
-        with:
-          ref: ${{ github.event.pull_request.head.sha }}
-      - name: Run scripts/check-commit.sh
-        run: ./.github/scripts/check-commit.sh
-        env:
-          ref: ${{ github.event.pull_request.head.sha }}
-  build:
-    runs-on: ubuntu-latest
-    permissions:
-      contents: read # to fetch code (actions/checkout)
-    container:
-      image: ghcr.io/kamailio/pkg-kamailio-docker:master-${{ matrix.distribution }}
-      credentials:
-        username: ${{ github.actor }}
-        password: ${{ secrets.GITHUB_TOKEN }}
-      volumes:
-        - ${{ github.workspace }}:/code
-      env:
-        DIST: ${{ matrix.distribution }}
-        CC: ${{ matrix.compilier }}
-    strategy:
-      matrix:
-        include:
-          - distribution: bookworm
-            compilier: gcc
-          - distribution: bookworm
-            compilier: clang
-    steps:
-      - name: Check out the repository to the runner
-        uses: actions/checkout@v4
-      - uses: ammaraskar/[email protected]
-      - name: build
-        run: |
-          cd /code
-          ./test/travis/build_travis.sh
-        shell: bash

+ 27 - 0
.github/workflows/rpm.yml

@@ -0,0 +1,27 @@
+---
+name: build
+'on':
+  push:
+    branches:
+      - master
+  # Allows you to run this workflow manually from the Actions tab
+  workflow_dispatch:
+jobs:
+  build:
+    runs-on: [ubuntu-latest, ubuntu-24.04-arm]
+    permissions:
+      contents: read
+    strategy:
+      matrix:
+        os:
+        - centos-10
+        - rhel-10
+        - centos-9
+        - rhel-9
+        - centos-8
+        - rhel-8
+    steps:
+    - uses: addnab/docker-run-action@v3
+      with:
+        image: alpine:latest
+        run: uname -a