-
Notifications
You must be signed in to change notification settings - Fork 435
96 lines (95 loc) · 2.53 KB
/
build_mac.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
name: Build CCExtractor on Mac
on:
workflow_dispatch:
push:
paths:
- '.github/workflows/build_mac.yml'
- '**.c'
- '**.h'
- '**Makefile**'
- 'mac/**'
- 'package_creators/**'
- 'src/rust/**'
pull_request:
types: [opened, synchronize, reopened]
paths:
- '.github/workflows/build_mac.yml'
- '**.c'
- '**.h'
- '**Makefile**'
- 'mac/**'
- 'package_creators/**'
- 'src/rust/**'
jobs:
build_shell:
runs-on: macos-latest
steps:
- name: Install dependencies
run: brew install pkg-config autoconf automake libtool tesseract leptonica gpac
- uses: actions/checkout@v4
- name: build
run: ./build.command
working-directory: ./mac
- name: Display version information
run: ./ccextractor --version
working-directory: ./mac
- name: Prepare artifacts
run: mkdir ./mac/artifacts
- name: Copy release artifact
run: cp ./mac/ccextractor ./mac/artifacts/
- uses: actions/upload-artifact@v4
with:
name: CCExtractor mac build
path: ./mac/artifacts
build_autoconf:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: brew install pkg-config autoconf automake libtool gpac
- name: run autogen
run: ./autogen.sh
working-directory: ./mac
- name: configure
run: ./configure --enable-debug
working-directory: ./mac
- name: make
run: make
working-directory: ./mac
- name: Display version information
run: ./ccextractor --version
working-directory: ./mac
cmake:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: dependencies
run: brew install gpac
- uses: actions/checkout@v4
- name: cmake
run: mkdir build && cd build && cmake ../src
- name: build
run: make -j$(nproc)
working-directory: build
- name: Display version information
run: ./build/ccextractor --version
build_rust:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: cache
uses: actions/cache@v4
with:
path: |
src/rust/.cargo/registry
src/rust/.cargo/git
src/rust/target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: build
run: cargo build
working-directory: ./src/rust