-
Notifications
You must be signed in to change notification settings - Fork 47
139 lines (121 loc) · 4.99 KB
/
adobe_source_libraries.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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
name: Build and Tests
on:
pull_request:
push:
branches:
- main
jobs:
# Information on the runner matrix can be found in the `matrix.json` file. To find available
# versions of compilers, check https://github.com/actions/runner-images/.
generate-matrix:
name: Generate job matrix
runs-on: ubuntu-22.04
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v2
- name: Generate job matrix
id: set-matrix
# Note: The json in this variable must be a single line for parsing to succeed.
# run: echo "matrix=$(cat .github/matrix.json | scripts/flatten_json.py)" >> $GITHUB_STATE
run: echo "::set-output name=matrix::$(cat .github/matrix.json | scripts/flatten_json.py)"
builds:
needs: generate-matrix
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix: ${{fromJson(needs.generate-matrix.outputs.matrix)}}
name: ${{ matrix.config.name }}
steps:
- uses: actions/checkout@v2
- name: Install dependencies (macos)
if: ${{ startsWith(matrix.config.os, 'macos') }}
run: |
rm '/usr/local/bin/2to3'
rm '/usr/local/bin/2to3-3.12'
rm '/usr/local/bin/idle3'
rm '/usr/local/bin/idle3.12'
rm '/usr/local/bin/pydoc3'
rm '/usr/local/bin/pydoc3.12'
rm '/usr/local/bin/python3'
rm '/usr/local/bin/python3.12'
rm '/usr/local/bin/python3-config'
rm '/usr/local/bin/python3.12-config'
brew install boost
brew install ninja
shell: bash
- name: Install dependencies (ubuntu)
if: ${{ startsWith(matrix.config.os, 'ubuntu') }}
run: |
sudo apt-get install -y ninja-build
sudo apt-get install -y libboost-all-dev
shell: bash
- name: Install dependencies (Windows)
if: ${{ startsWith(matrix.config.os, 'windows') }}
run: |
choco install --yes ninja
vcpkg install --triplet=x64-windows
shell: cmd
# Keep this around for debugging. If something in the `vcpkg` setup chokes,
# this step can be used to extract `issue_body.md` from the build system
# and its contents pasted into an issue filed against `vcpkg`.
# (for example, https://github.com/microsoft/vcpkg/issues/39518)
# - name: Archive dependency log files (Windows)
# if: always()
# uses: actions/upload-artifact@v4
# with:
# name: win-dependency-log-body
# path: D:/a/adobe_source_libraries/adobe_source_libraries/vcpkg_installed/vcpkg/issue_body.md
- name: Set enviroment variables (Linux+GCC)
if: ${{ matrix.config.compiler == 'gcc' }}
shell: bash
run: |
echo "CC=gcc-${{matrix.config.version}}" >> $GITHUB_ENV
echo "CXX=g++-${{matrix.config.version}}" >> $GITHUB_ENV
- name: Set enviroment variables (Linux+Clang)
if: ${{ matrix.config.compiler == 'clang' }}
shell: bash
run: |
echo "CC=clang-${{matrix.config.version}}" >> $GITHUB_ENV
echo "CXX=clang++-${{matrix.config.version}}" >> $GITHUB_ENV
# - name: Set enviroment variables (MacOS)
# if: ${{ matrix.config.compiler == 'apple-clang' }}
# shell: bash
# run: |
# echo "CC=$(brew --prefix llvm@13)/bin/clang" >> $GITHUB_ENV
# echo "CXX=$(brew --prefix llvm@13)/bin/clang++" >> $GITHUB_ENV
- name: Configure (Ubuntu)
if: ${{ startsWith(matrix.config.os, 'ubuntu') }}
shell: bash
run: |
mkdir ../build
cmake -S. -B../build -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=${{matrix.config.cxxstd}}
- name: Configure (MacOS)
if: ${{ startsWith(matrix.config.os, 'macos') }}
shell: bash
run: |
mkdir ../build
cmake -S. -B../build -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=${{matrix.config.cxxstd}}
- name: Configure (Windows)
if: ${{ startsWith(matrix.config.os, 'windows') }}
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
mkdir ..\build
cmake -S. -B../build -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=${{matrix.config.cxxstd}} -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DBOOST_TEST_DYN_LINK=TRUE
- name: Build (Unix)
if: ${{ startsWith(matrix.config.os, 'ubuntu') || startsWith(matrix.config.os, 'macos') }}
shell: bash
run: |
cmake --build ../build/
- name: Build (Windows)
if: ${{ startsWith(matrix.config.os, 'windows') }}
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
cmake --build ../build/
- name: Test
shell: bash
run: |
cd ../build/
ctest --output-on-failure