Skip to content

Github CI - Disable ipv6 (#88) #243

Github CI - Disable ipv6 (#88)

Github CI - Disable ipv6 (#88) #243

Workflow file for this run

name: Tinyphone Build
on:
push:
branches:
- master
tags:
- v*
pull_request:
branches:
- master
jobs:
tinyphone_win_job:
name: Build Tinyphone Windows
runs-on: windows-2019
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: '1'
submodules: 'recursive'
- name: Disable IPv6
shell: bash -l {0}
run: echo "DISABLE_IPV6=1" >> $GITHUB_ENV
- name: Restore Boost Cache
uses: actions/cache@v3
id: cache-boost
with:
path: C:\local\boost_1_74_0
key: boost-74
- name: Install Boost
if: steps.cache-boost.outputs.cache-hit != 'true'
run: |
# Use the boost_1_74_0-msvc-14.1-64.exe for Windows 2019
$Url = "https://onboardcloud.dl.sourceforge.net/project/boost/boost-binaries/1.74.0/boost_1_74_0-msvc-14.2-32.exe"
(New-Object System.Net.WebClient).DownloadFile($Url, "$env:TEMP\boost.exe")
Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=C:\local\boost_1_74_0"
- name: Install Scoop & Binaries
run : |
[Net.ServicePointManager]::SecurityProtocol =[Net.SecurityProtocolType]::Tls12 ;
(New-Object System.Net.WebClient).DownloadFile('https://get.scoop.sh', "install_scoop.ps1");
.\install_scoop.ps1 -RunAsAdmin
scoop install curl wget cmake unzip make;
- name: Install wixtoolset
run : |
$Url = "https://github.com/wixtoolset/wix3/releases/download/wix3112rtm/wix311.exe"
(New-Object System.Net.WebClient).DownloadFile($Url, "$env:TEMP\wix311.exe")
Start-Process -Wait -FilePath "$env:TEMP\wix311.exe" "/install","/quiet","/norestart"
- name: Add msbuild to PATH
uses: microsoft/[email protected]
- name: Configure build for Windows MSVC
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x86
- name: Build Project
run : |
$env:CodeDir=$(pwd)
.\distribution\docker\release.ps1 -ErrorAction Stop
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: tinyphone.msi
path: |
./tinyphone-installer/bin/Release/tinyphone_installer.msi
- name: Create Release
uses: ncipollo/release-action@v1
if: startsWith(github.ref, 'refs/tags/v')
with:
artifacts: "./tinyphone/Release/tinyphone.exe,tinyphone-installer/bin/Release/tinyphone_installer.msi"
draft: true
allowUpdates: true
token: ${{ secrets.GH_TOKEN }}
tinyphone_osx_job:
name: Build Tinyphone macOS
runs-on: macos-11
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: '1'
submodules: 'recursive'
- name: Disable IPv6
shell: bash -l {0}
run: echo "DISABLE_IPV6=1" >> $GITHUB_ENV
- name: Install the Apple certificate and provisioning profile
env:
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
#BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
run: |
# create variables
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
# import certificate and provisioning profile from secrets
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode --output $CERTIFICATE_PATH
#echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode --output $PP_PATH
# create temporary keychain
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
# import certificate to keychain
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security list-keychain -d user -s $KEYCHAIN_PATH
#print signing keys
security find-identity -v
# apply provisioning profile
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
#cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
- name: Install Dependencies
shell: bash
run : |
export HOMEBREW_NO_INSTALL_CLEANUP=true
brew install autoconf automake libtool tree wget opencore-amr
wget https://gist.githubusercontent.com/kingster/1954ead3c38a40cac88c5c1311bb39c5/raw/343da2c7a2a52ee5a1c03902cc5e44ed83b1dd5d/cryptopp.rb
brew install --build-from-source -f cryptopp.rb
npm install -g appdmg
- name: Compile Libraries
run : |
#xcode needs to be proper at this point
xcode-select --print-path
#boost
pushd tinyphone-osx/vendor/boost
./boost.sh -macos --boost-version 1.74.0
popd
#stastd
pushd lib/statsd-cpp
mkdir build-osx
cd build-osx
cmake ..
make
popd
- name: Build Project
run : |
pushd tinyphone-osx
pod install
security find-identity -v -p codesigning
xcodebuild -workspace Tinyphone.xcworkspace -scheme Tinyphone -configuration Release CODE_SIGN_IDENTITY="Apple Development" CODE_SIGNING_REQUIRED=YES
./package.sh
# Don't sign dmg with developer certificate, throws nasty warning.
# codesign --force --sign "Apple Development" tinyphone.dmg
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: tinyphone.dmg
path: |
./tinyphone-osx/tinyphone.dmg
- name: Create Release
uses: ncipollo/release-action@v1
if: startsWith(github.ref, 'refs/tags/v')
with:
artifacts: "./tinyphone-osx/tinyphone.dmg"
draft: true
allowUpdates: true
token: ${{ secrets.GH_TOKEN }}
tinyphone_linux_job:
name: Build Tinyphone Linux
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: '1'
submodules: 'recursive'
- name: Disable IPv6
shell: bash -l {0}
run: echo "DISABLE_IPV6=1" >> $GITHUB_ENV
- name: Install Dependencies
shell: bash
run : |
sudo apt-get update
sudo apt-get install -y build-essential cmake libcurl4-openssl-dev pkg-config libboost1.71-all-dev libasound-dev
- name: Compile Libraries
run : |
pushd lib/cryptopp/
make
sudo make install
popd
pushd lib/pjproject
cat >./pjlib/include/pj/config_site.h <<EOL
#define ENABLE_SIP_TCP 1
#define PJ_HAS_TCP 1
#define PJMEDIA_AUDIO_DEV_HAS_WASAPI 0
#define PJMEDIA_AUDIO_DEV_HAS_WMME 0
EOL
cat ./pjlib/include/pj/config_site.h
./configure
make realclean
make dep
make
sudo make install
popd
- name: Build Project
run : |
pushd tinyphone-linux
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: tinyphone.linux
path: |
./tinyphone-linux/build/tinyphone