Skip to content

Commit af9f61d

Browse files
authored
Merge pull request #240 from AppDevNext/UbuntuRunner
Ubuntu x86 runner
2 parents d495525 + 71761c2 commit af9f61d

File tree

2 files changed

+34
-6
lines changed

2 files changed

+34
-6
lines changed

.github/workflows/Android-CI.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
os: [ macOS-13 ]
20+
os: [ ubuntu-latest ]
2121
api: [ 28 ]
2222
tag: [ default ]
2323
abi: [ x86_64 ]
@@ -28,8 +28,17 @@ jobs:
2828
with:
2929
fetch-depth: 0
3030
submodules: true
31+
- name: kvm support
32+
run: |
33+
egrep -c '(vmx|svm)' /proc/cpuinfo
34+
id
35+
sudo adduser $USER kvm
36+
sudo chown -R $USER /dev/kvm
37+
id
3138
- name: prepare
32-
run: brew install exiftool imagemagick
39+
run: |
40+
sudo apt-get update && sudo apt-get install -y exiftool imagemagick xdg-utils libimage-exiftool-perl zsh jq xorg
41+
# brew install exiftool imagemagick
3342
- name: Install JDK ${{ matrix.java_version }}
3443
uses: actions/setup-java@v4
3544
with:
@@ -66,7 +75,9 @@ jobs:
6675
CLASSIC_TOKEN: ${{ secrets.CLASSIC_TOKEN }}
6776
run: |
6877
ls -ls MPChartExample/build/outputs/connected_android_test_additional_output/debugAndroidTest/connected
69-
cp MPChartExample/build/outputs/connected_android_test_additional_output/debugAndroidTest/connected/emulator\(AVD\)\ -\ 9/* screenshotsToCompare
78+
cp MPChartExample/build/outputs/connected_android_test_additional_output/debugAndroidTest/connected/emulator-5554\ -\ 9/* screenshotsToCompare
79+
export DISPLAY=:99
80+
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
7081
./screenShotCompare.sh
7182
- name: Archive screenshots diffs
7283
if: ${{ always() }}

screenShotCompare.sh

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,25 @@ source scripts/lib.sh
1111

1212
PR=$(echo "$GITHUB_REF_NAME" | sed "s/\// /" | awk '{print $1}')
1313
echo pr=$PR
14-
brew install jq
1514

16-
echo "delete all old comments, starting with Screenshot differs:$emulatorApi"
15+
OS="`uname`"
16+
case $OS in
17+
'Linux')
18+
;;
19+
'FreeBSD')
20+
;;
21+
'WindowsNT')
22+
;;
23+
'Darwin')
24+
brew install jq
25+
;;
26+
'SunOS')
27+
;;
28+
'AIX') ;;
29+
*) ;;
30+
esac
31+
32+
echo "=> delete all old comments, starting with Screenshot differs:$emulatorApi"
1733
oldComments=$(curl_gh -X GET https://api.github.com/repos/"$GITHUB_REPOSITORY"/issues/"$PR"/comments | jq '.[] | (.id |tostring) + "|" + (.user.login | test("github-actions") | tostring) + "|" + (.body | test("Screenshot differs:'$emulatorApi'.*") | tostring)' | grep "true|true" | tr -d "\"" | cut -f1 -d"|")
1834
echo "comments=$comments"
1935
echo "$oldComments" | while read comment; do
@@ -22,11 +38,12 @@ echo "$oldComments" | while read comment; do
2238
done
2339

2440
pushd $diffFiles
41+
pwd
2542
body=""
2643
COUNTER=0
2744
ls -la
2845

29-
# ignore an error, when no files where found https://unix.stackexchange.com/a/723909/201876
46+
echo "=> ignore an error, when no files where found https://unix.stackexchange.com/a/723909/201876"
3047
setopt no_nomatch
3148
for f in *.png; do
3249
if [[ ${f} == "*.png" ]]

0 commit comments

Comments
 (0)