forked from LibraryOfCongress/embARC
-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (69 loc) · 2.99 KB
/
embARC_Checks.yml
File metadata and controls
72 lines (69 loc) · 2.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Checks
on: [push, pull_request]
jobs:
Unix:
strategy:
matrix:
os: [ubuntu-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
- uses: actions/setup-java@v5
with:
distribution: 'corretto'
java-version: '21'
- uses: FedericoCarboni/setup-ffmpeg@v3
id: setup-ffmpeg
with:
ffmpeg-version: release
- name: embARC-maj
run: |
git clone --depth=1 https://github.com/PortalMedia/embARC-maj.git
- name: Compile
run: |
sed -i.bak 's/com.portalmedia.embarc.gui.Launcher/com.portalmedia.embarc.cli.Main/g' build.gradle
./gradlew build
- name: Check
run: |
ffmpeg -f lavfi -i "testsrc2=size=1920x1080:rate=30" -vframes 1 -pix_fmt rgb48le 000001.dpx
echo -n '{"COPYRIGHT_STATEMENT": "PLACEHOLDERTEXT"}' > copyright.json
java -jar build/libs/embARC-$(<Project/version.txt)-all.jar 000001.dpx -applyChangesFromJSON copyright.json
java -jar build/libs/embARC-$(<Project/version.txt)-all.jar 000001.dpx -json 000001.dpx.json
grep "PLACEHOLDERTEXT" 000001.dpx.json
Windows:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
- uses: actions/setup-java@v5
with:
distribution: 'corretto'
java-version: '21'
- uses: FedericoCarboni/setup-ffmpeg@v3
id: setup-ffmpeg
with:
ffmpeg-version: release
- name: embARC-maj
run: |
# Don't use git clone because it's fail on Windows due to invalid path (.metadata/.plugins/org.eclipse.core.runtime/.settings/org.springframework.ide.eclipse.boot.dash:Cloud Foundry.prefs')
Invoke-WebRequest -Uri "https://github.com/PortalMedia/embARC-maj/archive/refs/heads/master.zip" -OutFile "embARC-maj.zip"
Expand-Archive -Path "embARC-maj.zip" -DestinationPath "."
Rename-Item -Path "embARC-maj-master" -NewName "embARC-maj"
- name: Compile
run: |
(Get-Content build.gradle) -replace 'com.portalmedia.embarc.gui.Launcher', 'com.portalmedia.embarc.cli.Main' | Set-Content build.gradle
.\gradlew.bat build
- name: Check
run: |
ffmpeg -f lavfi -i "testsrc2=size=1920x1080:rate=30" -vframes 1 -pix_fmt rgb48le 000001.dpx
'{"COPYRIGHT_STATEMENT": "PLACEHOLDERTEXT"}' | Set-Content copyright.json -NoNewline
$version = Get-Content Project/version.txt
java -jar "build/libs/embARC-$version-all.jar" 000001.dpx -applyChangesFromJSON copyright.json
java -jar "build/libs/embARC-$version-all.jar" 000001.dpx -json 000001.dpx.json
if (-not (Select-String -Pattern "PLACEHOLDERTEXT" -Path "000001.dpx.json")) { throw "PLACEHOLDERTEXT not found" }