Skip to content

Commit

Permalink
Update CI.yml
Browse files Browse the repository at this point in the history
Update CI.yml
Create docker-compose.yml
Create Dockerfile
Update CI.yml
Update Dockerfile
Update Dockerfile
Update CI.yml
Update CI.yml
Update Dockerfile
Update Dockerfile
Update Dockerfile
Update Dockerfile
  • Loading branch information
dylanmtaylor committed Aug 26, 2020
1 parent 09be988 commit 04a0f68
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@ name: CI Job

on:
push:
branches: [ master ]
branches: [ master, dev ]
pull_request:
branches: [ master ]
branches: [ master, dev ]

jobs:
build:
runs-on: ubuntu-latest
container: thyrlian/android-sdk:latest
steps:
- uses: actions/checkout@v2
- name: Set timezone
run: export TZ="Etc/UTC"; ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
- name: Install build dependencies
run: apt-get update && apt-get -y install ffmpeg libsdl2-2.0-0 android-sdk adb build-essential git pkg-config meson ninja-build libavcodec-dev libavformat-dev libavutil-dev libsdl2-dev openjdk-8-jdk python3-pip mingw-w64 mingw-w64-tools android-tools-adb
- name: Build scrcpy
run: ./release.sh
- name: Workaround for checkstyle failurs
run: sed -i 's/server check/server/g' release.sh
- name: Allow builder user to write to project directory
run: chmod -R 777 .
- name: Run scrcpy buid using docker-compose
run: docker-compose up
- uses: actions/upload-artifact@v2
with:
name: scrcpy
Expand Down
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM thyrlian/android-sdk:latest

# Set Timezone and Install Build Dependencies
RUN export TZ="Etc/UTC"; ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone \
&& apt-get update && apt-get -y install ffmpeg libsdl2-2.0-0 android-sdk adb build-essential git pkg-config meson ninja-build libavcodec-dev libavformat-dev libavutil-dev libsdl2-dev openjdk-8-jdk python3-pip mingw-w64 mingw-w64-tools android-tools-adb zip

# Add builder user so that build is not running as root
RUN groupadd -r builder && useradd -m -r -g builder builder && chown -R builder:builder /opt/android-sdk
USER builder

CMD cd /scrcpy && ./release.sh
8 changes: 8 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: '2'

services:
scrcpy:
build: .
privileged: true
volumes:
- .:/scrcpy

0 comments on commit 04a0f68

Please sign in to comment.