Skip to content

Commit

Permalink
Test native 1
Browse files Browse the repository at this point in the history
  • Loading branch information
gtjoseph committed Oct 3, 2024
1 parent 8bcea30 commit 26da776
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 54 deletions.
23 changes: 18 additions & 5 deletions .github/workflows/AsteriskBuildAndCache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ on:
type: string
default: ""
required: false
sipp_version:
required: false
type: string
default: v3.6.1
output_cache_dir:
type: string
required: false
Expand Down Expand Up @@ -61,6 +65,7 @@ env:
BUILD_SCRIPT: ${{ inputs.build_script }}
BUILD_OPTIONS: ${{ inputs.build_options }}
MODULES_BLACKLIST: ${{ inputs.modules_blacklist }}
SIPP_VERSION: ${{ inputs.sipp_version }}
CACHE_DIR: ${{ github.workspace }}/${{ inputs.output_cache_dir }}
REPO_DIR: ${{ github.event.repository.name }}
REPO_ORG: ${{ github.event.repository.owner.login }}
Expand All @@ -75,24 +80,23 @@ jobs:
Build:
name: ${{ inputs.base_branch }}-build
runs-on: ubuntu-latest
container:
image: ghcr.io/asterisk/asteriskci-agent-rocky8:latest
options: --privileged
defaults:
run:
shell: bash
steps:
- name: Setup Runner
uses: asterisk/asterisk-ci-actions/SetupUbuntuRunner@main-test-native

- name: DumpEnvironment
if: ${{ inputs.debug }}
uses: asterisk/asterisk-ci-actions/DumpEnvironmentAction@main

- name: BuildAsterisk
run: |
sysctl -w kernel.core_pattern=/tmp/core-%e-%t
chmod 1777 /tmp
echo "*** Cloning ${REPO_ORG}/${ACTION_DIR}"
git clone ${GITHUB_SERVER_URL}/${REPO_ORG}/${ACTION_DIR}
git -C ${ACTION_DIR} checkout ${CI_BRANCH:-main}
REPO_DIR=$(basename ${ASTERISK_REPO})
mkdir -p ${REPO_DIR}
mkdir -p ${CACHE_DIR}
Expand Down Expand Up @@ -134,6 +138,15 @@ jobs:
# We don't care if it fails
gh cache delete ${BUILD_CACHE_KEY} || :
- name: BuildSipp
run: |
cd ${GITHUB_WORKSPACE}
git clone ${GITHUB_SERVER_URL}/SIPp/sipp.git
cd sipp
git checkout ${SIPP_VERSION}
./build.sh --full
install -D -t ${BUILD_CACHE_DIR}/bin sipp
- id: cache-build-output
name: CacheBuildProducts
uses: actions/cache/save@v4
Expand Down
46 changes: 11 additions & 35 deletions .github/workflows/TestWorkflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,14 @@ on:
workflow_dispatch:

jobs:
TestNative:
runs-on: ubuntu-latest
steps:
- name: clone
run: |
echo "Cloning"
git clone -q -b master --depth 10 --no-tags \
https://x-access-token:${GITHUB_TOKEN}@github.com/asterisk/asterisk asterisk
- name: install
run: |
echo "Running install_prereq install"
cd asterisk
sudo apt update -y
sudo apt install -y binutils-dev doxygen freetds-dev graphviz \
libasound2-dev libbluetooth-dev libc-client2007e-dev \
libcap-dev libcfg-dev libcodec2-dev libcorosync-common-dev \
libcpg-dev libcurl4-openssl-dev libedit-dev libfftw3-dev \
libgmime-3.0-dev libgsm1-dev libical-dev libiksemel-dev \
libjack-jackd2-dev libjansson-dev libldap-dev libldap2-dev \
liblua5.2-dev libneon27-dev libnewt-dev libogg-dev libpopt-dev \
libradcli-dev libresample1-dev libsndfile1-dev libsnmp-dev \
libspandsp-dev libspeex-dev libspeexdsp-dev libsrtp2-dev \
libunbound-dev liburiparser-dev libvorbis-dev libxslt1-dev \
portaudio19-dev xmlstarlet
echo "Installing addons"
sudo apt install -y sudo python3-dev python3*-venv postgresql \
git libpcap-dev nano python3-pip alembic odbc-postgresql \
unixodbc unixodbc-dev python3-psycopg2
- name: build
run: |
git config --global --add safe.directory $(realpath asterisk)
cd asterisk
./configure --enable-dev-mode --with-libjwt-bundled
make -j8
Build:
uses: ./.github/workflows/AsteriskBuildAndCache.yml
with:
test_type: nightly
asterisk_repo: asterisk/asterisk
pr_number: 931
base_branch: master
is_cherry_pick: false
build_cache_key: ${{ github.workflow }}-931-master
secrets:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
36 changes: 22 additions & 14 deletions SetupUbuntuRunner/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,30 @@ name: SetupUbuntuRunner
runs:
using: "composite"
steps:
- name: "Set kernel.corepattern"
- name: "Set sysctls"
shell: bash
run: |
sudo sysctl -w kernel.core_pattern=/tmp/core-%e-%t
- name: "Enable IPv6"
shell: bash
run: |
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=0 || :
# docker_exec=$(sed -n -r -e "/^ExecStart/p" /etc/systemd/system/multi-user.target.wants/docker.service)
# cat <<-EOF >/tmp/ipv6.conf
# [Service]
# ExecStart=
# ${docker_exec} --ipv6 --fixed-cidr-v6 "fc00:dead:beef::/64"
# EOF
# sudo mkdir /etc/systemd/system/docker.service.d
# sudo cp /tmp/ipv6.conf /etc/systemd/system/docker.service.d/ipv6.conf
# sudo systemctl daemon-reload
# sudo systemctl restart docker
sudo chmod 1777 /tmp
- name: install_prereqs
shell: bash
run: |
echo "Running install_prereq install"
sudo apt-get update -qq
sudo apt-get install -qq binutils-dev freetds-dev \
libasound2-dev libbluetooth-dev libc-client2007e-dev \
libcap-dev libcfg-dev libcodec2-dev libcorosync-common-dev \
libcpg-dev libcurl4-openssl-dev libedit-dev libfftw3-dev \
libgmime-3.0-dev libgsm1-dev libical-dev libiksemel-dev \
libjansson-dev libldap-dev libldap2-dev \
liblua5.2-dev libneon27-dev libnewt-dev libogg-dev libpopt-dev \
libradcli-dev libresample1-dev libsndfile1-dev libsnmp-dev \
libspandsp-dev libspeex-dev libspeexdsp-dev libsrtp2-dev \
libunbound-dev liburiparser-dev libvorbis-dev libxslt1-dev \
xmlstarlet
echo "Installing addons"
sudo apt-get install -qq cmake libsctp-dev sudo python3-dev python3*-venv \
postgresql git libpcap-dev nano python3-pip alembic odbc-postgresql \
unixodbc unixodbc-dev python3-psycopg2 rsync

0 comments on commit 26da776

Please sign in to comment.