ci: Switch from Travis to GitHub Actions

This commit is contained in:
Matthias Klumpp 2021-01-22 23:44:40 +01:00
parent 548c8b5b19
commit 881ca841ea
5 changed files with 30 additions and 34 deletions

21
.github/workflows/build-test.yml vendored Normal file
View File

@ -0,0 +1,21 @@
name: Build Test
on: [push, pull_request]
jobs:
build-debian-testing:
name: Debian Testing
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.dc == 'gdc' }}
strategy:
matrix:
dc: [ldc, gdc]
steps:
- uses: actions/checkout@v2
- name: Create Build Environment
run: cd tests/ci/ && docker build -t asgen -f ./Dockerfile .
- name: Build & Test
run: docker run -t -e DC=${{ matrix.dc }} -v `pwd`:/build asgen
./tests/ci/build-and-test.sh

View File

@ -1,22 +0,0 @@
# Travis CI config for the AppStream Generator
language: d
sudo: required
dist: trusty
services:
- docker
d:
- gdc
- ldc
matrix:
allow_failures:
- d: gdc
before_script:
- docker build -t asgen -f tests/ci/Dockerfile .
script:
- docker run -t -e DC=$DC -v `pwd`:/build asgen
./tests/ci/build_and_test.sh

View File

@ -11,7 +11,7 @@ If you are looking for the AppStream client-tools, the [AppStream repository](ht
## Development
[![Build Status](https://travis-ci.org/ximion/appstream-generator.svg?branch=master)](https://travis-ci.org/ximion/appstream-generator)
![Build Test](https://github.com/ximion/appstream-generator/workflows/Build%20Test/badge.svg)
### Build dependencies

View File

@ -7,7 +7,7 @@ FROM debian:testing
RUN apt-get update -qq
# install build essentials
RUN apt-get install -yq eatmydata git gcc gdc ldc gdc-10
RUN apt-get install -yq eatmydata git gcc gdc ldc
# install dependencies used by both appstream and appstream-generator
RUN eatmydata apt-get install -yq --no-install-recommends \
@ -37,7 +37,11 @@ RUN eatmydata apt-get install -yq --no-install-recommends \
libpango1.0-dev
# Misc
RUN apt-get install -yq --no-install-recommends curl gnupg ffmpeg
RUN apt-get install -yq --no-install-recommends \
curl \
gnupg \
ffmpeg \
yarnpkg
# Install dscanner
RUN mkdir -p /usr/local/bin/
@ -46,12 +50,6 @@ RUN tar -xzf /tmp/dscanner.tar.gz -C /usr/local/bin/
RUN rm /tmp/dscanner.tar.gz
RUN dscanner --version
# JavaScript stuff
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN apt-get update -qq
RUN apt-get install -yq --no-install-recommends nodejs yarn
# build & install the current Git snapshot of AppStream
RUN mkdir /build-tmp

View File

@ -6,10 +6,9 @@
set -e
export LANG=C.UTF-8
# prefer GDC 10 over the default for now
if [ "$DC" = "gdc" ];
if [ "$DC" = "ldc" ];
then
export DC="gdc-10"
export DC=ldc2
fi
echo "D compiler: $DC"