From 4822fc167df90eed5d69a2456045ce16dad81f92 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 23 Dec 2020 13:07:19 +0000 Subject: [PATCH 1/6] ci: Add MSYS2 workflow on GitHub Actions --- .github/workflows/msys2.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/msys2.yml diff --git a/.github/workflows/msys2.yml b/.github/workflows/msys2.yml new file mode 100644 index 0000000..3286e71 --- /dev/null +++ b/.github/workflows/msys2.yml @@ -0,0 +1,28 @@ +name: MSYS2 Build + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: windows-latest + defaults: + run: + shell: msys2 {0} + env: + PYTHONIOENCODING: "utf-8" + steps: + - uses: actions/checkout@master + - uses: msys2/setup-msys2@v2 + with: + msystem: MINGW64 + update: true + install: base-devel git mingw-w64-x86_64-meson mingw-w64-x86_64-ninja mingw-w64-x86_64-pkg-config mingw-w64-x86_64-python3 mingw-w64-x86_64-python3-pip mingw-w64-x86_64-toolchain + - name: Build + run: | + meson setup _build + meson compile -C _build + meson test -C _build From c4520d0a7238cdf6ff2b49a37f28b446a5550024 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 23 Dec 2020 13:08:10 +0000 Subject: [PATCH 2/6] ci: Add MSVC workflow on GitHub Actions --- .github/workflows/msvc-env.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/msvc-env.yml diff --git a/.github/workflows/msvc-env.yml b/.github/workflows/msvc-env.yml new file mode 100644 index 0000000..a4e69c8 --- /dev/null +++ b/.github/workflows/msvc-env.yml @@ -0,0 +1,23 @@ +name: MSVC Build + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: windows-latest + env: + PYTHONIOENCODING: "utf-8" + steps: + - uses: actions/checkout@master + - uses: actions/setup-python@v1 + - uses: seanmiddleditch/gha-setup-vsdevenv@master + - uses: BSFishy/meson-build@v1.0.1 + with: + action: test + directory: _build + options: --verbose --fatal-meson-warnings + meson-version: 0.54.3 From 14ab6c6bb8532e3b2c5c248fe77ac61b0b0e5ecd Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 23 Dec 2020 13:11:20 +0000 Subject: [PATCH 3/6] ci: Use scripts for GitHub Actions Do not share them with the Travis pipelines. --- .github/scripts/epoxy-ci-linux.sh | 32 +++++++++++++++++++++++++++++++ .github/scripts/epoxy-ci-osx.sh | 27 ++++++++++++++++++++++++++ .github/workflows/ci.yml | 4 ++-- 3 files changed, 61 insertions(+), 2 deletions(-) create mode 100755 .github/scripts/epoxy-ci-linux.sh create mode 100755 .github/scripts/epoxy-ci-osx.sh diff --git a/.github/scripts/epoxy-ci-linux.sh b/.github/scripts/epoxy-ci-linux.sh new file mode 100755 index 0000000..e95584f --- /dev/null +++ b/.github/scripts/epoxy-ci-linux.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +dump_log_and_quit() { + local exitcode=$1 + + cat meson-logs/testlog.txt + + exit $exitcode +} + +# Start Xvfb +XVFB_WHD=${XVFB_WHD:-1280x720x16} + +Xvfb :99 -ac -screen 0 $XVFB_WHD -nolisten tcp & +xvfb=$! + +export DISPLAY=:99 + +srcdir=$( pwd ) +builddir=$( mktemp -d build_XXXXXX ) + +meson --prefix /usr "$@" $builddir $srcdir || exit $? + +cd $builddir + +ninja || exit $? +meson test || dump_log_and_quit $? + +cd .. + +# Stop Xvfb +kill -9 ${xvfb} diff --git a/.github/scripts/epoxy-ci-osx.sh b/.github/scripts/epoxy-ci-osx.sh new file mode 100755 index 0000000..1a062a1 --- /dev/null +++ b/.github/scripts/epoxy-ci-osx.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +dump_log_and_quit() { + local exitcode=$1 + + cat meson-logs/testlog.txt + + exit $exitcode +} + +export SDKROOT=$( xcodebuild -version -sdk macosx Path ) +export CPPFLAGS=-I/usr/local/include +export LDFLAGS=-L/usr/local/lib +export OBJC=$CC +export PATH=$HOME/tools:$PATH + +srcdir=$( pwd ) +builddir=$( mktemp -d build_XXXXXX ) + +meson ${BUILDOPTS} $builddir $srcdir || exit $? + +cd $builddir + +ninja || exit $? +meson test || dump_log_and_quit $? + +cd .. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index edd6c5b..4086757 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,6 +43,6 @@ jobs: python -m pip install --upgrade pip pip3 install meson - if: runner.os == 'macOS' - run: /bin/sh -c "CC=${{ matrix.compiler }} .travis/epoxy-ci-osx.sh ${{ matrix.build-opts }}" + run: /bin/sh -c "CC=${{ matrix.compiler }} .github/scripts/epoxy-ci-osx.sh ${{ matrix.build-opts }}" - if: runner.os == 'Linux' - run: /bin/sh -c "CC=${{ matrix.compiler }} .travis/epoxy-ci-linux.sh ${{ matrix.build-opts }}" + run: /bin/sh -c "CC=${{ matrix.compiler }} .github/scripts/epoxy-ci-linux.sh ${{ matrix.build-opts }}" From 599847dfd6dab1c68d0dadc9729fc64126aaad1a Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 23 Dec 2020 13:17:06 +0000 Subject: [PATCH 4/6] ci: Remove Travis The GitHub Actions pipeline replaces Travis in any way it matters. --- .travis.yml | 55 --------------------------------------- .travis/Dockerfile | 29 --------------------- .travis/epoxy-ci-linux.sh | 32 ----------------------- .travis/epoxy-ci-osx.sh | 27 ------------------- .travis/run-docker.sh | 12 --------- 5 files changed, 155 deletions(-) delete mode 100644 .travis.yml delete mode 100644 .travis/Dockerfile delete mode 100755 .travis/epoxy-ci-linux.sh delete mode 100755 .travis/epoxy-ci-osx.sh delete mode 100755 .travis/run-docker.sh diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0fe6610..0000000 --- a/.travis.yml +++ /dev/null @@ -1,55 +0,0 @@ -sudo: false - -branches: - except: - - debian - - khronos-registry - -os: - - linux - - osx - -compiler: - - gcc - - clang - -language: - - c - -services: - - docker - -matrix: - exclude: - - os: osx - compiler: gcc - -before_install: - - | - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then - brew update - brew unlink python@2 - brew install python@3 meson - # Use a Ninja with QuLogic's patch: https://github.com/ninja-build/ninja/issues/1219 - mkdir -p $HOME/tools; curl -L http://nirbheek.in/files/binaries/ninja/macos/ninja -o $HOME/tools/ninja; chmod +x $HOME/tools/ninja - fi - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker pull ebassi/epoxyci ; fi - -before_script: - - | - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then - echo FROM ebassi/epoxyci > Dockerfile - echo ADD . /root >> Dockerfile - echo WORKDIR /root >> Dockerfile - docker build -t withgit . - fi - -env: - - BUILD_OPTS="" - - BUILD_OPTS="-Dglx=no" - - BUILD_OPTS="-Degl=no" - - BUILD_OPTS="-Dx11=false" - -script: - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker run withgit /bin/sh -c "CC=$CC .travis/epoxy-ci-linux.sh $BUILD_OPTS" ; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then /bin/sh -c "CC=$CC .travis/epoxy-ci-osx.sh $BUILD_OPTS" ; fi diff --git a/.travis/Dockerfile b/.travis/Dockerfile deleted file mode 100644 index bd9b40a..0000000 --- a/.travis/Dockerfile +++ /dev/null @@ -1,29 +0,0 @@ -FROM debian:stretch-slim -MAINTAINER Emmanuele Bassi - -RUN apt-get update -qq && \ - apt-get install --no-install-recommends -qq -y \ - ca-certificates \ - clang \ - gcc \ - libgl1-mesa-dev \ - libegl1-mesa-dev \ - libgles1-mesa-dev \ - libgles2-mesa-dev \ - libgl1-mesa-dri \ - locales \ - ninja-build \ - pkg-config \ - python3 \ - python3-pip \ - python3-setuptools \ - python3-wheel \ - xvfb && \ - rm -rf /usr/share/doc/* /usr/share/man/* - -RUN locale-gen C.UTF-8 && /usr/sbin/update-locale LANG=C.UTF-8 -ENV LANG=C.UTF-8 LANGUAGE=C.UTF-8 LC_ALL=C.UTF-8 - -RUN pip3 install meson - -WORKDIR /root diff --git a/.travis/epoxy-ci-linux.sh b/.travis/epoxy-ci-linux.sh deleted file mode 100755 index e95584f..0000000 --- a/.travis/epoxy-ci-linux.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash - -dump_log_and_quit() { - local exitcode=$1 - - cat meson-logs/testlog.txt - - exit $exitcode -} - -# Start Xvfb -XVFB_WHD=${XVFB_WHD:-1280x720x16} - -Xvfb :99 -ac -screen 0 $XVFB_WHD -nolisten tcp & -xvfb=$! - -export DISPLAY=:99 - -srcdir=$( pwd ) -builddir=$( mktemp -d build_XXXXXX ) - -meson --prefix /usr "$@" $builddir $srcdir || exit $? - -cd $builddir - -ninja || exit $? -meson test || dump_log_and_quit $? - -cd .. - -# Stop Xvfb -kill -9 ${xvfb} diff --git a/.travis/epoxy-ci-osx.sh b/.travis/epoxy-ci-osx.sh deleted file mode 100755 index 1a062a1..0000000 --- a/.travis/epoxy-ci-osx.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh - -dump_log_and_quit() { - local exitcode=$1 - - cat meson-logs/testlog.txt - - exit $exitcode -} - -export SDKROOT=$( xcodebuild -version -sdk macosx Path ) -export CPPFLAGS=-I/usr/local/include -export LDFLAGS=-L/usr/local/lib -export OBJC=$CC -export PATH=$HOME/tools:$PATH - -srcdir=$( pwd ) -builddir=$( mktemp -d build_XXXXXX ) - -meson ${BUILDOPTS} $builddir $srcdir || exit $? - -cd $builddir - -ninja || exit $? -meson test || dump_log_and_quit $? - -cd .. diff --git a/.travis/run-docker.sh b/.travis/run-docker.sh deleted file mode 100755 index 4b3ecc7..0000000 --- a/.travis/run-docker.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -set -xe - -srcdir="$(pwd)/.." - -sudo docker build \ - --tag "epoxyci" \ - --file "Dockerfile" . -sudo docker run --rm \ - --volume "${srcdir}:/root/epoxy" \ - --tty --interactive "epoxyci" bash From 3e35bb868833a1f54deef6819eb457db9f551081 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 23 Dec 2020 13:17:44 +0000 Subject: [PATCH 5/6] ci: Remove AppVeyor pipeline We have MSYS2 and MSVC pipelines on GitHub Actions. --- .appveyor.yml | 67 --------------------------------------------------- 1 file changed, 67 deletions(-) delete mode 100644 .appveyor.yml diff --git a/.appveyor.yml b/.appveyor.yml deleted file mode 100644 index 8e0cae2..0000000 --- a/.appveyor.yml +++ /dev/null @@ -1,67 +0,0 @@ -version: 1.0.{build} - -image: Visual Studio 2015 - -configuration: Release - -# Configure both 32-bit and 64-bit builds -environment: - matrix: - - platform: x86 - config: Win32 - pout: x86 - - platform: x64 - config: x64 - pout: x64 - -shallow_clone: true - -# Download Meson and Ninja, create install directory -before_build: -- mkdir build -- mkdir libepoxy-shared-%pout% -- cd build -- curl -LsSO https://github.com/mesonbuild/meson/releases/download/0.47.1/meson-0.47.1.tar.gz -- 7z x meson-0.47.1.tar.gz -- move dist\meson-0.47.1.tar . -- 7z x meson-0.47.1.tar -- rmdir dist -- del meson-0.47.1.tar meson-0.47.1.tar.gz -- curl -LsSO https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-win.zip -- 7z x ninja-win.zip -- del ninja-win.zip -- cd .. - -# Build and install -build_script: -- cd build -- call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %PLATFORM% -- C:\Python36\python.exe meson-0.47.1\meson.py .. . --backend=ninja --prefix=%APPVEYOR_BUILD_FOLDER%\libepoxy-shared-%pout% -- ninja -- ninja install -- cd .. - -# Copy license into install directory and create .zip file -after_build: -- copy COPYING libepoxy-shared-%pout% -- dir libepoxy-shared-%pout% /s /b -- 7z a -tzip libepoxy-shared-%pout%.zip libepoxy-shared-%pout% - -artifacts: - - path: libepoxy-shared-%pout%.zip - name: libepoxy-shared-%pout% - -test: off - -# Upload .zip file to GitHub release -deploy: - release: $(APPVEYOR_REPO_TAG_NAME) - description: "Epoxy $(APPVEYOR_REPO_TAG_NAME)" - provider: GitHub - auth_token: - secure: X7Ro8Y2RWYo/M1AAn93f9X0dEQFvu7gPb6li2eKRtzPYLGj/JKm7MNWRw2cCcjm6 - artifact: libepoxy-shared-$(pout) - draft: false - prerelease: false - on: - appveyor_repo_tag: true # deploy on tag push only From 4c686ff5e34552db0a121adf3054b33b6f708aae Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 23 Dec 2020 14:06:12 +0000 Subject: [PATCH 6/6] ci: Drop tests from MSYS2 pipeline The WGL tests are failing, likely because of some set up issue; for the time being, we care more about building Epoxy, rather than testing it. --- .github/workflows/msys2.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/msys2.yml b/.github/workflows/msys2.yml index 3286e71..0f90a2b 100644 --- a/.github/workflows/msys2.yml +++ b/.github/workflows/msys2.yml @@ -25,4 +25,3 @@ jobs: run: | meson setup _build meson compile -C _build - meson test -C _build