|
| 1 | +name: Build |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [master] |
| 6 | + pull_request: |
| 7 | + branches: [master] |
| 8 | + |
| 9 | +concurrency: |
| 10 | + group: ${{ github.workflow }}-func-${{ github.event.pull_request.number || github.ref }} |
| 11 | + cancel-in-progress: true |
| 12 | + |
| 13 | +jobs: |
| 14 | + functional-tests: |
| 15 | + runs-on: ubuntu-latest |
| 16 | + name: ubuntu | func | signal |
| 17 | + steps: |
| 18 | + - uses: actions/checkout@v4 |
| 19 | + |
| 20 | + - name: Install system dependencies |
| 21 | + run: | |
| 22 | + sudo apt-get update |
| 23 | + sudo apt-get install -y --no-install-recommends \ |
| 24 | + libcmocka-dev libcurl4-openssl-dev libgcrypt20-dev libglib2.0-dev \ |
| 25 | + libgpgme-dev libgtk-3-dev libmicrohttpd-dev libncursesw5-dev \ |
| 26 | + libnotify-dev libotr5-dev libreadline-dev libsignal-protocol-c-dev \ |
| 27 | + libomemo-c-dev libssl-dev libtool libxss-dev meson ninja-build \ |
| 28 | + pkg-config python3-dev python-dev-is-python3 libsqlite3-dev \ |
| 29 | + libgdk-pixbuf-2.0-dev libqrencode-dev libenchant-2-dev \ |
| 30 | + autoconf autoconf-archive automake cmake expect |
| 31 | + |
| 32 | + - name: Install stabber |
| 33 | + run: | |
| 34 | + git clone --depth 1 https://github.com/profanity-im/stabber /tmp/stabber |
| 35 | + cd /tmp/stabber |
| 36 | + ./bootstrap.sh |
| 37 | + ./configure --prefix=/usr |
| 38 | + make -j$(nproc) |
| 39 | + sudo make install |
| 40 | + |
| 41 | + - name: Install libstrophe (master) |
| 42 | + run: | |
| 43 | + git clone --depth 1 https://github.com/strophe/libstrophe /tmp/libstrophe |
| 44 | + cd /tmp/libstrophe |
| 45 | + ./bootstrap.sh |
| 46 | + ./configure --prefix=/usr |
| 47 | + make -j$(nproc) |
| 48 | + sudo make install |
| 49 | +
|
| 50 | + - name: Configure and Build |
| 51 | + run: | |
| 52 | + # Use --buildtype=debugoptimized (-O2) for fast execution. |
| 53 | + # Explicitly disable sanitizers to avoid the performance penalty. |
| 54 | + meson setup build_run \ |
| 55 | + --buildtype=debugoptimized \ |
| 56 | + -Db_sanitize=none \ |
| 57 | + -Dnotifications=enabled \ |
| 58 | + -Dpython-plugins=enabled \ |
| 59 | + -Dc-plugins=enabled \ |
| 60 | + -Dotr=enabled \ |
| 61 | + -Dpgp=enabled \ |
| 62 | + -Domemo=enabled \ |
| 63 | + -Domemo-qrcode=enabled \ |
| 64 | + -Dicons-and-clipboard=enabled \ |
| 65 | + -Dgdk-pixbuf=enabled \ |
| 66 | + -Dxscreensaver=enabled \ |
| 67 | + -Dspellcheck=enabled \ |
| 68 | + -Dtests=true |
| 69 | + meson compile -C build_run profanity:executable functionaltests |
| 70 | +
|
| 71 | + - name: Verify Profanity Binary |
| 72 | + run: | |
| 73 | + ./build_run/profanity --version |
| 74 | +
|
| 75 | + - name: Run Functional Tests |
| 76 | + env: |
| 77 | + TERM: xterm |
| 78 | + LC_ALL: C.UTF-8 |
| 79 | + run: | |
| 80 | + ./build_run/functionaltests |
0 commit comments