From decedeabc70aea14be4f6c590b8b62229adc3f43 Mon Sep 17 00:00:00 2001 From: naxuroqa Date: Sun, 1 Mar 2020 11:01:52 +0100 Subject: [PATCH] VENOM-497: Fix compile errors --- .circleci/config.yml | 195 ----------------------------- .github/workflows/ci-workflow.yaml | 102 +++++++++++++++ .travis.yml | 69 ---------- src/tox/ToxSessionThread.vala | 2 +- 4 files changed, 103 insertions(+), 265 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/ci-workflow.yaml delete mode 100644 .travis.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 9602682..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,195 +0,0 @@ ---- -version: 2.1 -commands: - debian-install-deps: - steps: - - run: - name: Install dependencies - command: apt-get -qq update - && apt-get -qq install -y - clang - cmake - libconfig-dev - libgtest-dev - libopus-dev - libsodium-dev - libvpx-dev - pkg-config - libgee-0.8-dev - libgspell-1-dev - libgtk-3-dev - libjson-glib-dev - libsoup2.4-dev - libsqlcipher-dev - libcanberra-dev - libgstreamer1.0-dev - libgstreamer-plugins-base1.0-dev - valac - python3-pip - wget - - run: - name: Install meson - command: pip3 install meson ninja - fedora-install-deps: - steps: - - run: - name: Install dependencies - command: dnf install -y - clang - make - cmake - libconfig-devel - gtest-devel - opus-devel - libsodium-devel - libvpx-devel - pkgconfig - libgee-devel - gspell-devel - gtk3-devel - json-glib-devel - libsoup-devel - sqlcipher-devel - libcanberra-devel - gstreamer1-devel - gstreamer1-plugins-base-devel - vala - python3-pip - wget - - run: - name: Install meson - command: pip3 install meson ninja - bootstrap-vala: - steps: - - run: - name: Bootstrap vala - command: | - apt-get -qq remove -y valac - apt-get -qq install -y flex bison - wget https://download.gnome.org/sources/vala/0.43/vala-0.43.6.tar.xz - tar -xJf vala-0.43.6.tar.xz - cd vala-0.43.6 - ./configure --prefix=/usr --disable-valadoc - make - make install - cd .. - install-toxcore: - steps: - - run: - name: Build and install toxcore - command: | - wget "https://github.com/TokTok/c-toxcore/archive/v0.2.9.tar.gz" - tar -xzf v0.2.9.tar.gz - cd c-toxcore-0.2.9 - cmake -DCMAKE_INSTALL_PREFIX=/usr - make - make install - cd .. - install-venom: - steps: - - run: - name: Configure - command: meson build - - run: - name: Build - command: ninja -C build - - run: - name: Test - command: ninja -C build test - - run: - name: Install - command: ninja -C build install -jobs: - "Ubuntu 18-04": - docker: - - image: ubuntu:18.04 - steps: - - checkout - - debian-install-deps - - install-toxcore - - install-venom - "Ubuntu 18-10": - docker: - - image: ubuntu:18.10 - steps: - - checkout - - debian-install-deps - - install-toxcore - - install-venom - "Debian 9": - docker: - - image: debian:stretch - steps: - - checkout - - debian-install-deps - - bootstrap-vala - - install-toxcore - - install-venom - "Debian 10": - docker: - - image: debian:buster - steps: - - checkout - - debian-install-deps - - install-toxcore - - install-venom - "Fedora 28": - docker: - - image: fedora:28 - steps: - - checkout - - fedora-install-deps - - install-toxcore - - install-venom - "Fedora 29": - docker: - - image: fedora:29 - steps: - - checkout - - fedora-install-deps - - install-toxcore - - install-venom - "Flatpak": - machine: true - steps: - - checkout - - run: - name: Start docker - command: docker run --privileged=true --name image -it -d --volume "$(pwd)":/opt/venom --workdir /opt/venom flatpak/flatpak-builder:gnome-3-28 - - restore_cache: - key: builder-cache - paths: - - .flatpak-builder - - run: - name: Build flatpak manifest dependencies - command: docker exec image flatpak-builder --stop-at=venom --repo=repo app com.github.naxuroqa.venom.json - - save_cache: - key: builder-cache - paths: - - .flatpak-builder - - run: - name: Build flatpak bundle - command: | - docker exec image flatpak build app meson --prefix=/app _build - docker exec image flatpak build app ninja -C _build install - docker exec image flatpak-builder --finish-only --repo=repo app com.github.naxuroqa.venom.json - docker exec image flatpak build-bundle repo "com.github.naxuroqa.venom-debug-build-${CIRCLE_BUILD_NUM}.x86_64.flatpak" --runtime-repo=https://dl.flathub.org/repo/flathub.flatpakrepo com.github.naxuroqa.venom - - run: - name: Prepare artifacts - command: | - mkdir flatpak-artifact - mv "com.github.naxuroqa.venom-debug-build-${CIRCLE_BUILD_NUM}.x86_64.flatpak" flatpak-artifact - - store_artifacts: - path: flatpak-artifact - destination: artifacts -workflows: - version: 2 - build: - jobs: - - "Ubuntu 18-04" - - "Ubuntu 18-10" - - "Debian 9" - - "Debian 10" - - "Fedora 28" - - "Fedora 29" - - "Flatpak" diff --git a/.github/workflows/ci-workflow.yaml b/.github/workflows/ci-workflow.yaml new file mode 100644 index 0000000..933ac75 --- /dev/null +++ b/.github/workflows/ci-workflow.yaml @@ -0,0 +1,102 @@ +name: VALA/C CI +on: [push, pull_request] +jobs: + native: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v1 + - name: Install meson + run: | + sudo python3 -m pip install --upgrade pip + sudo pip3 install meson ninja + - name: Install dependencies + run: > + sudo apt-get -qq install -y + clang + cmake + libconfig-dev + libgtest-dev + libopus-dev + libsodium-dev + libvpx-dev + pkg-config + libgee-0.8-dev + libgspell-1-dev + libgtk-3-dev + libjson-glib-dev + libsoup2.4-dev + libsqlcipher-dev + libcanberra-dev + libgstreamer1.0-dev + libgstreamer-plugins-base1.0-dev + valac + wget + - name: Build and install ToxCore + run: | + wget "https://github.com/TokTok/c-toxcore/archive/v0.2.9.tar.gz" + tar -xzf v0.2.9.tar.gz + cd c-toxcore-0.2.9 + cmake -DCMAKE_INSTALL_PREFIX=/usr + make + sudo make install + cd .. + - name: meson build + run: meson build + - name: Build + run: ninja -C build + - name: Test + run: ninja -C build test + - name: Install + run: sudo ninja -C build install + # container: + # runs-on: ubuntu-latest + # container: fedora:29 + # steps: + # - uses: actions/checkout@v2 + # - uses: actions/setup-python@v1 + # - name: Install meson + # run: | + # python3 -m pip install --upgrade pip + # pip3 install meson ninja + # - name: Install dependencies + # run: > + # dnf install -y + # clang + # make + # cmake + # libconfig-devel + # gtest-devel + # opus-devel + # libsodium-devel + # libvpx-devel + # pkgconfig + # libgee-devel + # gspell-devel + # gtk3-devel + # json-glib-devel + # libsoup-devel + # sqlcipher-devel + # libcanberra-devel + # gstreamer1-devel + # gstreamer1-plugins-base-devel + # vala + # python3-pip + # wget + # - name: Build and install ToxCore + # run: | + # wget "https://github.com/TokTok/c-toxcore/archive/v0.2.9.tar.gz" + # tar -xzf v0.2.9.tar.gz + # cd c-toxcore-0.2.9 + # cmake -DCMAKE_INSTALL_PREFIX=/usr + # make + # make install + # cd .. + # - name: meson build + # run: meson build + # - name: Build + # run: ninja -C build + # - name: Test + # run: ninja -C build test + # - name: Install + # run: ninja -C build install \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d7be91d..0000000 --- a/.travis.yml +++ /dev/null @@ -1,69 +0,0 @@ -language: c -services: [docker] - -matrix: - include: - - name: "Ubuntu 18.04" - env: DOCKER_IMAGE=ubuntu:18.04 - - name: "Ubuntu 18.10" - env: DOCKER_IMAGE=ubuntu:18.10 - - name: "Debian 10" - env: DOCKER_IMAGE=debian:buster - - name: "Flatpak" - env: DOCKER_IMAGE=flatpak/flatpak-builder:gnome-3-28 - cache: - directories: - - .flatpak-builder - install: - - docker run --privileged=true --name image -it -d --volume "$(pwd)":/opt/venom --workdir /opt/venom $DOCKER_IMAGE - script: - - docker exec image flatpak-builder --stop-at=venom --repo=repo app com.github.naxuroqa.venom.json - - docker exec image flatpak build app meson --prefix=/app _build - - docker exec image flatpak build app ninja -C _build install - - docker exec image flatpak-builder --finish-only --repo=repo app com.github.naxuroqa.venom.json - - docker exec image flatpak build-bundle repo com.github.naxuroqa.venom.x86_64.flatpak --runtime-repo=https://dl.flathub.org/repo/flathub.flatpakrepo com.github.naxuroqa.venom - -cache: - - ccache - -install: - - docker run --name image -it -d --volume "$(pwd)":/tmp/venom --workdir /tmp/venom $DOCKER_IMAGE - - docker exec image apt-get -qq update - - docker exec image apt-get -qq install -y - clang - cmake - libconfig-dev - libgtest-dev - libopus-dev - libsodium-dev - libvpx-dev - pkg-config - libgee-0.8-dev - libgspell-1-dev - libgtk-3-dev - libjson-glib-dev - libsoup2.4-dev - libsqlcipher-dev - libcanberra-dev - libgstreamer1.0-dev - libgstreamer-plugins-base1.0-dev - valac - python3-pip - wget - > /dev/null - - docker exec image pip3 install meson ninja - - docker exec image bash -c "wget 'https://github.com/TokTok/c-toxcore/archive/v0.2.9.tar.gz' - && tar -xzf v0.2.9.tar.gz - && cd c-toxcore-0.2.9 - && cmake -DCMAKE_INSTALL_PREFIX=/usr - && make - && make install" - -script: - - docker exec image meson -D b_coverage=true build - - docker exec image ninja -C build - - docker exec image ninja -C build test - - docker exec image ninja -C build install - -after_success: - - bash <(curl -s https://codecov.io/bash) diff --git a/src/tox/ToxSessionThread.vala b/src/tox/ToxSessionThread.vala index 89ecbbb..29f42e9 100644 --- a/src/tox/ToxSessionThread.vala +++ b/src/tox/ToxSessionThread.vala @@ -38,7 +38,7 @@ namespace Venom { protected GLib.MainContext worker_context; protected GLib.MainLoop worker_loop; - public ToxBaseThread(string name, Logger logger) { + protected ToxBaseThread(string name, Logger logger) { this.name = name; this.logger = logger; }