Skip to content

Commit

Permalink
Switch to GitHub CI (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
kingster authored May 4, 2021
1 parent 8620c79 commit b3958c6
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 58 deletions.
100 changes: 100 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Oreka Build

on:
release:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
oreka_cpp_job:
runs-on: ubuntu-latest
name: Build Orkaudio
services:
registry:
image: registry:2
ports:
- 5000:5000
strategy:
fail-fast: false
matrix:
os-version: [ "xenial", "bionic", "focal" ]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Clone build-tool repo
run : |
git clone https://github.com/voiceip/oreka-build.git ./oreka-build
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
with:
driver-opts: network=host
- name: Cache Docker layers ${{ matrix.os-version }}
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ matrix.os-version }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-${{ matrix.os-version }}-
- name: Build Docker Image for ubuntu-${{ matrix.os-version }}
uses: docker/build-push-action@v2
with:
# using "load: true" forces the docker driver
# not necessary here, because we set it before
#load: true
push: true
tags: localhost:5000/${{ github.repository_owner }}/oreka-${{ matrix.os-version }}:latest
context: .
file: ./.devcontainer/Dockerfile.orkaudio.build
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
build-args: |
TAG=${{ matrix.os-version }}
os-version: ${{ matrix.os-version }}
- name: Compile
run: |
docker run -v $(pwd)/oreka-build:/oreka-build -v $(pwd):/oreka-src -i -i localhost:5000/${{ github.repository_owner }}/oreka-${{ matrix.os-version }}:latest bash /entrypoint.sh
mv ./oreka-build/distribution/orkaudio.deb ./oreka-build/distribution/orkaudio_${{ matrix.os-version }}.deb
- name: "Create release"
uses: ncipollo/release-action@v1
if: startsWith(github.ref, 'refs/tags/v')
with:
artifacts: "./oreka-build/distribution/*.deb"
draft: true
allowUpdates: true
token: ${{ secrets.GH_TOKEN }}
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
oreka_java_job:
runs-on: ubuntu-latest
name: Build Orkweb & Orktrack
steps:
- uses: actions/checkout@v2
- name: Set up JDK 9
uses: actions/setup-java@v2
with:
java-version: '9'
distribution: 'adopt'
- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build with Maven
run: |
mvn clean install -DskipTests -Dmaven.test.skip=true
- name: "Create release"
uses: ncipollo/release-action@v1
if: startsWith(github.ref, 'refs/tags/v')
with:
artifacts: "orktrack/target/*.war,orkweb/target/*.war"
draft: true
allowUpdates: true
token: ${{ secrets.GH_TOKEN }}
58 changes: 0 additions & 58 deletions .travis.yml

This file was deleted.

0 comments on commit b3958c6

Please sign in to comment.