diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..c05f063f9 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,87 @@ +name: ci + +on: + push: + branches: + - calamares + pull_request: + types: + - opened + - reopened + - synchronize + workflow_dispatch: + +env: + BUILDDIR: /build + SRCDIR: ${{ github.workspace }} + CMAKE_ARGS: | + -DWEBVIEW_FORCE_WEBKIT=1 + -DKDE_INSTALL_USE_QT_SYS_PATHS=ON + -DWITH_PYTHONQT=OFF" + -DCMAKE_BUILD_TYPE=Debug + +jobs: + build: + runs-on: ubuntu-latest + container: + image: docker://kdeneon/plasma:user + options: --tmpfs /build:rw --user 0:0 + steps: + - + name: prepare env + run: | + sudo apt-get update + sudo apt-get -y install git-core + - + name: checkout + uses: actions/checkout@v2 + - + name: install dependencies + run: | + sudo apt-get -y install \ + build-essential \ + cmake \ + extra-cmake-modules \ + gettext \ + kio-dev \ + libatasmart-dev \ + libboost-python-dev \ + libkf5config-dev \ + libkf5coreaddons-dev \ + libkf5i18n-dev \ + libkf5iconthemes-dev \ + libkf5parts-dev \ + libkf5service-dev \ + libkf5solid-dev \ + libkpmcore-dev \ + libparted-dev \ + libpolkit-qt5-1-dev \ + libqt5svg5-dev \ + libqt5webkit5-dev \ + libyaml-cpp-dev \ + os-prober \ + pkg-config \ + python3-dev \ + qtbase5-dev \ + qtdeclarative5-dev \ + qttools5-dev \ + qttools5-dev-tools + - + name: prepare build + run: | + test -n "$BUILDDIR" || { echo "! \$BUILDDIR not set" ; exit 1 ; } + mkdir -p $BUILDDIR + test -f $SRCDIR/CMakeLists.txt || { echo "! Missing $SRCDIR/CMakeLists.txt" ; exit 1 ; } + - + name: cmake + working-directory: ${{ env.BUILDDIR }} + run: cmake $CMAKE_ARGS $SRCDIR + - + name: make + working-directory: ${{ env.BUILDDIR }} + run: make -j2 VERBOSE=1 + - + name: install + working-directory: ${{ env.BUILDDIR }} + run: | + make install VERBOSE=1 \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7a1ba094d..000000000 --- a/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -# SPDX-FileCopyrightText: no -# SPDX-License-Identifier: CC0-1.0 -# -language: cpp - -python: - - 3.5 - -sudo: required - -services: - - docker - -notifications: - irc: - - "chat.freenode.net#calamares" - -install: - - docker build -t calamares . - -script: - - docker run -v $PWD:/src --tmpfs /build:rw,size=112M -e SRCDIR=/src -e BUILDDIR=/build calamares "/src/ci/travis.sh" - diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 7a1cad92a..000000000 --- a/Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -# SPDX-FileCopyrightText: 2017 Rohan Garg -# SPDX-License-Identifier: BSD-2-Clause - -FROM kdeneon/all:user -RUN sudo apt-get update && sudo apt-get -y install build-essential cmake extra-cmake-modules gettext kio-dev libatasmart-dev libboost-python-dev libkf5config-dev libkf5coreaddons-dev libkf5i18n-dev libkf5iconthemes-dev libkf5parts-dev libkf5service-dev libkf5solid-dev libkpmcore-dev libparted-dev libpolkit-qt5-1-dev libqt5svg5-dev libqt5webkit5-dev libyaml-cpp-dev os-prober pkg-config python3-dev qtbase5-dev qtdeclarative5-dev qttools5-dev qttools5-dev-tools diff --git a/ci/travis-config.sh b/ci/travis-config.sh deleted file mode 100644 index 15163cc99..000000000 --- a/ci/travis-config.sh +++ /dev/null @@ -1,16 +0,0 @@ -# Build configuration on Travis. -# -# SPDX-FileCopyrightText: 2018 Adriaan de Groot -# SPDX-License-Identifier: BSD-2-Clause -# -# Defines a CMAKE_ARGS variable for use with cmake -# -# This file is sourced by travis.sh, and exports the variables -# to the environment. -CMAKE_ARGS="\ - -DCMAKE_BUILD_TYPE=Release \ - -DWEBVIEW_FORCE_WEBKIT=1 \ - -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \ - -DWITH_PYTHONQT=OFF" - -export CMAKE_ARGS diff --git a/ci/travis-continuous.sh b/ci/travis-continuous.sh deleted file mode 100755 index ceb80df9b..000000000 --- a/ci/travis-continuous.sh +++ /dev/null @@ -1,58 +0,0 @@ -#! /bin/sh -# -# SPDX-FileCopyrightText: 2017 Adriaan de Groot -# SPDX-License-Identifier: BSD-2-Clause -# -# Travis CI script for use on every-commit: -# - build and install Calamares -# -test -n "$BUILDDIR" || { echo "! \$BUILDDIR not set" ; exit 1 ; } -test -n "$SRCDIR" || { echo "! \$SRCDIR not set" ; exit 1 ; } - -test -d $BUILDDIR || { echo "! $BUILDDIR not a directory" ; exit 1 ; } -test -d $SRCDIR || { echo "! $SRCDIR not a directory" ; exit 1 ; } -test -f $SRCDIR/CMakeLists.txt || { echo "! Missing $SRCDIR/CMakeLists.txt" ; exit 1 ; } - -cd $BUILDDIR || exit 1 - -section() { -echo "###" -echo "### $1" -echo "###" -pwd -P -df -h -} - -section "cmake $CMAKE_ARGS $SRCDIR" -cmake $CMAKE_ARGS $SRCDIR || { echo "! CMake failed" ; exit 1 ; } - -section "make" -make -j2 VERBOSE=1 || { echo "! Make recheck" ; pwd -P ; df -h ; make -j1 VERBOSE=1 ; echo "! Make failed" ; exit 1 ; } - -section "make install" - -install_debugging() { - ls -la $( find "$1" -type f -name '*.so' ) -} - -echo "# Build results" -install_debugging "$BUILDDIR" - -echo "# Install" -DESTDIR=/build/INSTALL_ROOT -mkdir -p "$DESTDIR" - -if make install VERBOSE=1 DESTDIR="$DESTDIR" ; -then - echo "# .. install OK" - result=true -else - echo "# .. install failed" - result=false -fi - - -section "Install results" -install_debugging "$DESTDIR" - -$result || { echo "! Install failed" ; exit 1 ; } # Result of make install, above diff --git a/ci/travis-coverity.sh b/ci/travis-coverity.sh deleted file mode 100755 index 5ec73568a..000000000 --- a/ci/travis-coverity.sh +++ /dev/null @@ -1,37 +0,0 @@ -#! /bin/sh -# -# SPDX-FileCopyrightText: 2017 Adriaan de Groot -# SPDX-License-Identifier: BSD-2-Clause -# -# Travis CI script for weekly (cron) use: -# - use the coverity tool to build and and upload results -# -test -n "$COVERITY_SCAN_TOKEN" || { echo "! Missing Coverity token" ; exit 1 ; } -test -n "$BUILDDIR" || { echo "! \$BUILDDIR not set" ; exit 1 ; } -test -n "$SRCDIR" || { echo "! \$SRCDIR not set" ; exit 1 ; } - -test -d $BUILDDIR || { echo "! $BUILDDIR not a directory" ; exit 1 ; } -test -d $SRCDIR || { echo "! $SRCDIR not a directory" ; exit 1 ; } -test -f $SRCDIR/CMakeLists.txt || { echo "! Missing $SRCDIR/CMakeLists.txt" ; exit 1 ; } - -cd $BUILDDIR || exit 1 - -curl -k -o coverity_tool.tar.gz \ - -d "token=$COVERITY_SCAN_TOKEN&project=calamares%2Fcalamares" \ - https://scan.coverity.com/download/cxx/linux64 || exit 1 -mkdir "$BUILDDIR/coveritytool" -tar xvf coverity_tool.tar.gz -C "$BUILDDIR/coveritytool" --strip-components 2 -export PATH="$BUILDDIR/coveritytool/bin:$PATH" - -echo "# cmake -DCMAKE_BUILD_TYPE=Debug $CMAKE_ARGS $SRCDIR" -cmake -DCMAKE_BUILD_TYPE=Debug $CMAKE_ARGS $SRCDIR || exit 1 -cov-build --dir cov-int make -j2 - -tar caf calamares-ci.tar.xz cov-int - -curl -k --form token=$COVERITY_SCAN_TOKEN \ - --form email=groot@kde.org \ - --form file=@calamares-ci.tar.xz \ - --form version="calamares-`date -u +%Y%m%d`" \ - --form description="calamares on `date -u`" \ - https://scan.coverity.com/builds?project=calamares%2Fcalamares diff --git a/ci/travis.sh b/ci/travis.sh deleted file mode 100755 index e182e48bb..000000000 --- a/ci/travis.sh +++ /dev/null @@ -1,24 +0,0 @@ -#! /bin/sh -# -# SPDX-FileCopyrightText: 2017 Adriaan de Groot -# SPDX-License-Identifier: BSD-2-Clause -# -# Travis build driver script: -# - the regular CI runs, triggered by commits, run a script that builds -# and installs calamares, and then runs the tests. -# - the cronjob CI runs, triggered weekly, run a script that uses the -# coverity tools to submit a build. This is slightly more resource- -# intensive than the coverity add-on, but works on master. -# -D=`dirname "$0"` -test -d "$D" || { echo "! No directory $D" ; exit 1 ; } -test -x "$D/travis-continuous.sh" || { echo "! Missing -continuous" ; exit 1 ; } -test -x "$D/travis-coverity.sh" || { echo "! Missing -coverity" ; exit 1 ; } - -test -f "$D/travis-config.sh" && . "$D/travis-config.sh" - -if test "$TRAVIS_EVENT_TYPE" = "cron" ; then - exec "$D/travis-coverity.sh" -else - exec "$D/travis-continuous.sh" -fi