Skip to content

toxcore amalgamation no av with includes #48

toxcore amalgamation no av with includes

toxcore amalgamation no av with includes #48

Workflow file for this run

name: test
on:
push:
pull_request:
jobs:
update-nightly-tag:
name: Update nightly release tag
runs-on: ubuntu-20.04
if: github.event_name == 'push' && github.ref == 'refs/heads/zoff99/tweaks_001'
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Move nightly tag to head for nightly release
run: git tag -f nightly && git push origin nightly -f
build-linux:
name: Linux
runs-on: ubuntu-20.04
needs: [update-nightly-tag]
if: |
always() &&
(needs.update-nightly-tag.result == 'success' ||
needs.update-nightly-tag.result == 'skipped')
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: |
sudo apt-get update && \
sudo DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends \
ca-certificates \
libconfig-dev \
libsodium-dev \
pkg-config
- name: compile binary
run: |
rm gitversion.h
make gitversion.h
make -j5 all
- name: compile binary with ASAN
run: |
rm gitversion.h
make gitversion.h
make -j5 asan_all
- name: test binary
run: |
ldd tuntox || echo ""
ls -hal tuntox
./tuntox -V
./tuntox &
sleep 50
- name: test binary with ASAN
run: |
ldd asan_tuntox_nostatic || echo ""
ls -hal asan_tuntox_nostatic
./asan_tuntox_nostatic -V
./asan_tuntox_nostatic &
sleep 50
- name: Rename artifact for nightly upload
if: github.event_name == 'push' && github.ref == 'refs/heads/zoff99/tweaks_001'
run: |
cp ./tuntox linux_tuntox_nightly
cp ./asan_tuntox_nostatic linux_asan_tuntox_nostatic_nightly
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: tuntox
path: tuntox
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: asan_tuntox_nostatic
path: asan_tuntox_nostatic
- name: Upload to nightly release
uses: ncipollo/release-action@v1
if: github.event_name == 'push' && github.ref == 'refs/heads/zoff99/tweaks_001'
with:
allowUpdates: true
tag: nightly
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
prerelease: true
replacesArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "linux_tuntox_nightly,linux_asan_tuntox_nostatic_nightly"
build-macos:
runs-on: macos-12
needs: [update-nightly-tag]
if: |
always() &&
(needs.update-nightly-tag.result == 'success' ||
needs.update-nightly-tag.result == 'skipped')
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: install deps
run: brew install libsodium
- name: compile binary
run: |
rm gitversion.h
make gitversion.h
make -j5 tuntox_nostatic
- name: test binary
run: |
otool -L tuntox_nostatic || echo ""
ls -hal tuntox_nostatic
./tuntox_nostatic -V
./tuntox_nostatic &
sleep 50
- name: Rename artifact for nightly upload
if: github.event_name == 'push' && github.ref == 'refs/heads/zoff99/tweaks_001'
run: |
cp ./tuntox_nostatic macos_tuntox_nostatic_nightly
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: macos_tuntox_nostatic_nightly
path: macos_tuntox_nostatic_nightly
- name: Upload to nightly release
uses: ncipollo/release-action@v1
if: github.event_name == 'push' && github.ref == 'refs/heads/zoff99/tweaks_001'
with:
allowUpdates: true
tag: nightly
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
prerelease: true
replacesArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "macos_tuntox_nostatic_nightly"
build-macos14arm:
runs-on: macos-14
needs: [update-nightly-tag]
if: |
always() &&
(needs.update-nightly-tag.result == 'success' ||
needs.update-nightly-tag.result == 'skipped')
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: install deps
run: brew install libsodium
- name: compile binary
run: |
rm gitversion.h
make gitversion.h
make -j5 tuntox_nostatic
- name: test binary
run: |
otool -L tuntox_nostatic || echo ""
ls -hal tuntox_nostatic
./tuntox_nostatic -V
./tuntox_nostatic &
sleep 50
- name: Rename artifact for nightly upload
if: github.event_name == 'push' && github.ref == 'refs/heads/zoff99/tweaks_001'
run: |
cp ./tuntox_nostatic macos_arm_tuntox_nostatic_nightly
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: macos_arm_tuntox_nostatic_nightly
path: macos_arm_tuntox_nostatic_nightly
- name: Upload to nightly release
uses: ncipollo/release-action@v1
if: github.event_name == 'push' && github.ref == 'refs/heads/zoff99/tweaks_001'
with:
allowUpdates: true
tag: nightly
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
prerelease: true
replacesArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "macos_arm_tuntox_nostatic_nightly"
build-windows:
runs-on: ubuntu-22.04
needs: [update-nightly-tag]
if: |
always() &&
(needs.update-nightly-tag.result == 'success' ||
needs.update-nightly-tag.result == 'skipped')
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: |
sudo apt-get update && \
sudo DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends \
ca-certificates \
yasm \
wget \
wine libwine-dev libwine wine64 wine64-tools winetricks \
coreutils autoconf libtool pkg-config \
gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 binutils-mingw-w64-x86-64 \
mingw-w64-tools pkg-config-mingw-w64-x86-64 win-iconv-mingw-w64-dev \
mingw-w64-x86-64-dev
- name: check mingw
run: dpkg -L gcc-mingw-w64-x86-64
- name: check mingw
run: dpkg -L mingw-w64-x86-64-dev
- name: build libsodium
run: |
_HOME_="$(pwd)"
export _HOME_
cd "$_HOME_"
export _SRC_=$_HOME_/src/
export _INST_=$_HOME_/inst/
mkdir -p $_SRC_
mkdir -p $_INST_
export LD_LIBRARY_PATH=$_INST_/lib/
export PKG_CONFIG_PATH=$_INST_/lib/pkgconfig
SODIUM_VERSION="1.0.20"
ARCH="x86_64"
export ARCH
MAKEFLAGS=j$(nproc)
export MAKEFLAGS
WGET_OPTIONS="--timeout=10"
export WGET_OPTIONS
export CXXFLAGS_ADDON="-O2 -g -fPIC"
export CFLAGS_ADDON="-O2 -g -fPIC"
export CFLAGS_ADDON_MORE=""
cd "$_SRC_"
SODIUM_FILENAME="libsodium-$SODIUM_VERSION.tar.gz"
rm -f libsodium-*.tar.gz
wget $WGET_OPTIONS "https://download.libsodium.org/libsodium/releases/$SODIUM_FILENAME" -O "$SODIUM_FILENAME"
tar -xf "$SODIUM_FILENAME"
cd libsodium*/
export CXXFLAGS=${CXXFLAGS_ADDON}
export CFLAGS=${CFLAGS_ADDON}
./configure --host="$ARCH-w64-mingw32" \
--prefix="$_INST_" \
--disable-shared \
--enable-static \
--with-pic || exit 1
make || exit 1
make install
cd "$_HOME_"
- name: compile binary
run: |
_HOME_="$(pwd)"
export _HOME_
cd "$_HOME_"
export _SRC_=$_HOME_/src/
export _INST_=$_HOME_/inst/
export LD_LIBRARY_PATH=$_INST_/lib/
export PKG_CONFIG_PATH=$_INST_/lib/pkgconfig
CC=/usr/bin/x86_64-w64-mingw32-gcc
LD=/usr/bin/x86_64-w64-mingw32-ld
NM=/usr/bin/x86_64-w64-mingw32-nm
AR=/usr/bin/x86_64-w64-mingw32-ar
export CC
export LD
export NM
export AR
export DSO_LDFLAGS="-L/usr/x86_64-w64-mingw32/lib/ -Wl,-Bstatic -lws2_32 -l:libiphlpapi.a -l:libshlwapi.a -l:libole32.a -l:libstrmiids.a -l:liboleaut32.a -l:libuuid.a -l:libgdi32.a -l:libavicap32.a -l:libvfw32.a -l:libpsapi.a -l:libshell32.a"
rm gitversion.h
make gitversion.h
make -j5 tuntox_nostatic || echo "NO ERR"
/usr/bin/x86_64-w64-mingw32-gcc -g -O3 -o tuntox_nostatic cJSON.o client.o gitversion.o log.o main.o tox_bootstrap_json.o toxcore_amalgamation_no_toxav.o util.o -lpthread -L/usr/x86_64-w64-mingw32/lib/ -Wl,-Bstatic -lws2_32 -l:libiphlpapi.a -l:libshlwapi.a -l:libole32.a -l:libstrmiids.a -l:liboleaut32.a -l:libuuid.a -l:libgdi32.a -l:libavicap32.a -l:libvfw32.a -l:libpsapi.a -l:libshell32.a -g -pthread -lm -L/tuntox/inst/lib -lsodium -fstack-protector || echo "NO ERR"
echo "*** WINDOWS NOT supported ***"