forked from HaijinW/libaribb25
-
Notifications
You must be signed in to change notification settings - Fork 14
122 lines (118 loc) · 4.47 KB
/
build.yml
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
name: Build
on: push
jobs:
ubuntu:
name: Ubuntu
strategy:
matrix:
os:
- ubuntu-20.04
- ubuntu-22.04
cc: [gcc, clang]
include:
- cc: gcc
cxx: g++
- cc: clang
cxx: clang++
runs-on: ${{ matrix.os }}
env:
CLICOLOR_FORCE: 1
steps:
- uses: actions/checkout@v3
- name: setup
run: sudo apt-get install -y build-essential clang cmake cmake-data libpcsclite-dev
- name: configure
run: |
cmake --version
cmake -B build -DCMAKE_C_COMPILER=${{ matrix.cc }} -DCMAKE_CXX_COMPILER=${{ matrix.cxx }}
- name: build
run: cmake --build build
- name: test
run: |
./build/b1 2>&1 | grep --color=always "ARIB STD-B1"
./build/b25 2>&1 | grep --color=always "ARIB STD-B25"
./build/arib-b1-stream-test --help 2>&1 | grep --color=always "ARIB STD-B1"
./build/arib-b25-stream-test --help 2>&1 | grep --color=always "ARIB STD-B25"
arm:
name: ARM
strategy:
matrix:
image:
- arm64v8/ubuntu
- arm64v8/debian
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- name: setup
uses: docker/build-push-action@v3
with:
context: .github/workflows/
tags: ${{ matrix.image }}:build
build-args: IMAGE=${{ matrix.image }}
cache-from: type=gha,scope=${{ matrix.image }}
cache-to: type=gha,scope=${{ matrix.image }},mode=max
load: true
- name: configure
run: |
mkdir build
docker run --rm -i -v $(pwd):/work -w /work/build -e CLICOLOR_FORCE=1 ${{ matrix.image }}:build bash -c 'cmake --version && cmake ..'
- name: build
run: docker run --rm -i -v $(pwd):/work -w /work/build -e CLICOLOR_FORCE=1 ${{ matrix.image }}:build cmake --build .
- name: test
run: |
docker run --rm -i -v $(pwd):/work -w /work/build -e CLICOLOR_FORCE=1 ${{ matrix.image }}:build bash -c './b1 2>&1 | grep --color=always "ARIB STD-B1"'
docker run --rm -i -v $(pwd):/work -w /work/build -e CLICOLOR_FORCE=1 ${{ matrix.image }}:build bash -c './b25 2>&1 | grep --color=always "ARIB STD-B25"'
docker run --rm -i -v $(pwd):/work -w /work/build -e CLICOLOR_FORCE=1 ${{ matrix.image }}:build bash -c './arib-b1-stream-test --help 2>&1 | grep --color=always "ARIB STD-B1"'
docker run --rm -i -v $(pwd):/work -w /work/build -e CLICOLOR_FORCE=1 ${{ matrix.image }}:build bash -c './arib-b25-stream-test --help 2>&1 | grep --color=always "ARIB STD-B25"'
macos:
name: macOS
strategy:
matrix:
os:
- macos-12
- macos-13
runs-on: ${{ matrix.os }}
env:
CLICOLOR_FORCE: 1
steps:
- uses: actions/checkout@v3
- name: configure
run: |
cmake --version
cmake -B build
- name: build
run: cmake --build build
- name: test
run: |
./build/b1 2>&1 | grep --color=always "ARIB STD-B1"
./build/b25 2>&1 | grep --color=always "ARIB STD-B25"
./build/arib-b1-stream-test --help 2>&1 | grep --color=always "ARIB STD-B1"
./build/arib-b25-stream-test --help 2>&1 | grep --color=always "ARIB STD-B25"
windows:
name: Windows
strategy:
matrix:
os:
- windows-2019
- windows-2022
runs-on: ${{ matrix.os }}
steps:
- name: setup msbuild
uses: microsoft/setup-msbuild@v1.1
- uses: actions/checkout@v3
- name: build
run: |
msbuild arib_std_b25.sln /t:Build /p:Configuration=Release /p:Platform=Win32 /p:PlatformToolset=v142
msbuild arib_std_b25.sln /t:Build /p:Configuration=Release /p:Platform=x64 /p:PlatformToolset=v142
- name: test
run: |
Win32\Release\b1.exe 2>&1 | findstr "ARIB STD-B1"
x64\Release\b1.exe 2>&1 | findstr "ARIB STD-B1"
Win32\Release\b25.exe 2>&1 | findstr "ARIB STD-B25"
x64\Release\b25.exe 2>&1 | findstr "ARIB STD-B25"
Win32\Release\arib-b1-stream-test.exe --help 2>&1 | findstr "ARIB STD-B1"
x64\Release\arib-b1-stream-test.exe --help 2>&1 | findstr "ARIB STD-B1"
Win32\Release\arib-b25-stream-test.exe --help 2>&1 | findstr "ARIB STD-B25"
x64\Release\arib-b25-stream-test.exe --help 2>&1 | findstr "ARIB STD-B25"