Skip to content

Commit

Permalink
replace autotools with @mesonbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
andy5995 committed Jul 14, 2021
1 parent 102d6bb commit 0f809a9
Show file tree
Hide file tree
Showing 102 changed files with 409 additions and 26,865 deletions.
31 changes: 31 additions & 0 deletions .github/scripts/test_m2k.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/sh

set -ev

sudo apt-get install -y gettext

USE_VALGRIND=""

if [ "$MATRIX_OS" = "ubuntu-latest" ] && [ "$MATRIX_ARCH" = "x86" ]; then
USE_VALGRIND=1
sudo apt-get install -y valgrind
fi

if [ "$MATRIX_OS" = "ubuntu-18.04" ]; then
sudo apt-get install -y python-setuptools
fi

sudo -H python3 -m pip install meson ninja

meson builddir
cd builddir
ninja -v
ninja dist

if [ -n "$USE_VALGRIND" ]; then
meson test --setup=valgrind
fi

# nls disabled
meson configure -Dnls=false
ninja -v
35 changes: 35 additions & 0 deletions .github/workflows/appimage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: AppImage Build
on:
push:
branches: [ master ]
jobs:

# This workflow contains a single job called "build"
build:
runs-on: ubuntu-18.04
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
with:
submodules: true
# Runs a single command using the runners shell
- name: Install required dependencies
run: sudo apt-get install -y meson

# Runs a set of commands using the runners shell
- name: Download building tools & executing AppImage build
run: |
wget -nv -c https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
chmod +x linuxdeploy-x86_64.AppImage
wget -q https://github.com/TheAssassin/pyuploadtool/releases/download/continuous/pyuploadtool-x86_64.AppImage
chmod +x pyuploadtool-x86_64.AppImage
- run: |
meson setup _build -Dprefix=/usr -Dstrip=true --buildtype=release
cd _build
ninja
DESTDIR=AppDir ninja -v install
../linuxdeploy-x86_64.AppImage --executable AppDir/usr/bin/modemu2k \
--icon-file=../packaging/modemu2k.png --icon-filename=modemu2k \
--create-desktop-file --appdir $PWD/AppDir --output appimage
../pyuploadtool-x86_64.AppImage modemu2k*AppImage
50 changes: 50 additions & 0 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: C/C++ CI

on:
push:
paths-ignore:
- '**/*.md'
pull_request:
paths-ignore:
- '**/*.md'

jobs:
gcc:
strategy:
fail-fast: false
matrix:
arch: [x64]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
env:
MATRIX_OS: ${{ matrix.os }}
MATRIX_ARCH: ${{ matrix.arch }}
steps:
- uses: actions/checkout@v2
- run: sh ./.github/scripts/test_m2k.sh

clang:
strategy:
fail-fast: false
matrix:
arch: [x64]
os: [ubuntu-latest]
compiler: [clang]
runs-on: ${{ matrix.os }}
env:
MAXTRIX_OS: ${{ matrix.os }}
MAXTRIX_ARCH: ${{ matrix.arch }}
steps:
- uses: actions/checkout@v2
- run: sh ./.github/scripts/test_m2k.sh


macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- run: brew install meson
- run: |
meson builddir
ninja -v -C builddir
ninja -C builddir dist
11 changes: 6 additions & 5 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ jobs:

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
#- name: Autobuild
#uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -65,9 +65,10 @@ jobs:
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
- run: |
meson builddir
cd builddir
ninja test
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
20 changes: 5 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
autom4te.cache
*~
_build

src/*.o
src/.deps
config.h
Makefile
src/modemu2k
src/stamp-h1
config.log
config.status
/po/Makevars.template
*.tar.gz
/_build/
/builddir/
*.gz
*.tgz
build
*.gmo
Dockerfile

# flex-generated file
lex.yy.c
cmdlex.c
110 changes: 0 additions & 110 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ cache: ccache
matrix:
# gcc
include:
- os: linux
dist: xenial
compiler: gcc
env: CHECK="true" COMPILER="default"
- os: linux
dist: xenial
compiler: gcc
Expand All @@ -23,110 +19,4 @@ matrix:
build_command_prepend: "./configure"
build_command: "make"
branch_pattern: coverity_scan
- os: linux
dist: bionic
compiler: gcc
env: MATRIX_EVAL="CC=gcc-6 && CXX=g++-6"
- os: linux
dist: bionic
compiler: gcc
# default is gcc-7 on bionic
- os: linux
dist: bionic
compiler: gcc
env: MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
- os: linux
dist: xenial
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-9
- valgrind
env:
- MATRIX_EVAL="CC=gcc-9 && CXX=g++-9"
- USE_VALGRIND="true"
- os: linux
dist: bionic
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-10
env: MATRIX_EVAL="CC=gcc-10 && CXX=g++-10"
- os: linux
dist: bionic
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-11
- valgrind
env:
- MATRIX_EVAL="CC=gcc-11 && CXX=g++-11"
- USE_VALGRIND="true"

# clang
- os: linux
dist: xenial
compiler: clang
addons:
apt:
sources:
- llvm-toolchain-xenial-5.0
packages:
- clang-5.0
env: MATRIX_EVAL="CC=clang-5.0 && CXX=clang++-5.0"
- os: linux
dist: xenial
compiler: clang
addons:
apt:
sources:
- llvm-toolchain-xenial-6.0
packages:
- clang-6.0
env: MATRIX_EVAL="CC=clang-6.0 && CXX=clang++-6.0"
- os: linux
dist: xenial
compiler: clang
# osx
- os: osx
osx_image: xcode9.4
env: XCODE="true"
- os: osx
osx_image: xcode10.1
env: XCODE="true"

# allow_failures:
# - os: osx

before_install:
- echo $CC
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then
eval "${MATRIX_EVAL}";
if [ -n "$MATRIX_EVAL" ] && [ "$TRAVIS_COMPILER" != "clang" ] && [ "$CC" != "gcc-9" ] && [ "$CC" != "gcc-10" ]; then
sudo apt-get install -y $CC;
fi;
fi
- if [ -n "${USE_VALGRIND}" ]; then
CONFIGURE_OPTS="--enable-valgrind";
fi
- export CONFIGURE_OPTS

script:
- if [ -n "$COVERITY_SCAN_TOKEN" ]; then
exit 0;
fi
- ./configure ${CONFIGURE_OPTS}
- if [ -z "$CHECK" ]; then
make check;
else
make distcheck;
fi

0 comments on commit 0f809a9

Please sign in to comment.