-
Notifications
You must be signed in to change notification settings - Fork 61
143 lines (126 loc) · 4.81 KB
/
update-docs-manual.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
140
141
142
143
name: Manual Update MeshLib Documentation Site
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
output_folder:
required: false
type: string
default: "MeshLib/dev"
# for test
pull_request:
branches: [ master ]
inputs:
output_folder:
required: false
type: string
default: "MeshLib/dev"
jobs:
# NOTE: all output values are strings
# use the ${{ needs.config.outputs.bool-param == 'true' }} construction to check boolean values
config:
uses: ./.github/workflows/config.yml
prepare-image:
if: false
needs: config
uses: ./.github/workflows/prepare-images.yml
with:
docker_image_tag: ${{ needs.config.outputs.docker_image_tag }}
need_linux_image_rebuild: ${{ needs.config.outputs.need_linux_image_rebuild == 'true' }}
need_windows_vcpkg_rebuild: ${{ needs.config.outputs.need_windows_vcpkg_rebuild == 'true' }}
vcpkg_version: ${{ needs.config.outputs.vcpkg_version }}
secrets: inherit
create-stubs:
timeout-minutes: 40
runs-on: [self-hosted, linux-arm64]
container:
image: ${{ matrix.docker-image }}
options: --user root
strategy:
fail-fast: false
matrix:
os: [ ubuntu22 ]
config: [ Release ]
compiler: [ clang ]
include:
- os: ubuntu22
docker-image: meshlib/meshlib-ubuntu22-arm64:${{ inputs.docker_image_tag }}
cxx-compiler: /usr/bin/clang++-14
c-compiler: /usr/bin/clang-14
cxx-standard: 20
#permissions:
# id-token: write # This is required for requesting the JWT
# contents: read # This is required for actions/checkout
steps:
- name: Work-around possible permission issues
shell: bash
run: |
# NOTE: {GITHUB_WORKSPACE} != {{ github.workspace }}
# Related issue: https://github.com/actions/runner/issues/2058
if test -d $GITHUB_WORKSPACE && test -n "$(find ${GITHUB_WORKSPACE} -user root)" ; then
mv ${GITHUB_WORKSPACE} ${GITHUB_WORKSPACE}_${RANDOM}
mkdir ${GITHUB_WORKSPACE}
fi
- name: Checkout
uses: actions/checkout@v4
# Is it necessary?
#- name: Collect runner's system stats
# continue-on-error: true
# uses: ./.github/actions/collect-runner-stats
# with:
# target_os: ${{ matrix.os }}
# target_arch: arm64
# cxx_compiler: ${{ matrix.cxx-compiler }}
# build_config: ${{ matrix.config }}
- name: Checkout third-party submodules
run: |
# have to checkout selective submodules by our own
# related issue: https://github.com/actions/checkout/issues/1779
export HOME=${RUNNER_TEMP}
git config --global --add safe.directory '*'
git submodule update --init --depth 1 thirdparty/imgui thirdparty/parallel-hashmap
- name: Install thirdparty libs
run: |
ln -s /usr/local/lib/meshlib-thirdparty-lib/lib ./lib
ln -s /usr/local/lib/meshlib-thirdparty-lib/include ./include
- name: Install mrbind
if: ${{ inputs.mrbind }}
run: scripts/mrbind/install_mrbind_ubuntu.sh
- name: Create virtualenv
run: |
python3 -m venv .venv
. .venv/bin/activate
echo $PATH >> $GITHUB_PATH
- name: Setup python requirements
run: python3 -m pip install -r ./requirements/python.txt
- name: Build
run: ./scripts/build_source.sh
env:
MESHLIB_BUILD_RELEASE: ${{ fromJSON('["OFF", "ON"]')[matrix.config == 'Release'] }}
MESHLIB_BUILD_DEBUG: ${{ fromJSON('["OFF", "ON"]')[matrix.config == 'Debug'] }}
CMAKE_CXX_COMPILER: ${{ matrix.cxx-compiler }}
MR_VERSION: ${{ inputs.app_version }}
# options to be passed to cmake
MR_CMAKE_OPTIONS: >
-DMR_CXX_STANDARD=${{ matrix.cxx-standard }}
-DMR_PCH_USE_EXTRA_HEADERS=ON
-DMESHLIB_BUILD_MRMESH_PY_LEGACY=${{ fromJSON('["ON", "OFF"]')[inputs.mrbind] }}
- name: Generate and build MRBind bindings
if: ${{ inputs.mrbind }}
env:
CXX: ${{ matrix.cxx-compiler }}
run: make -f scripts/mrbind/generate.mk MODE=none -B --trace MESHLIB_SHLIB_DIR=build/${{matrix.config}}/bin
- name: Create Python Stubs
run: python3 ./scripts/wheel/create_stubs.py
- name: Upload Python Stubs
uses: actions/upload-artifact@v4
with:
name: PythonStubs
path: ./scripts/wheel/meshlib/meshlib/*.pyi
retention-days: 1
update-dev-documentation:
needs: [ create-stubs ]
uses: ./.github/workflows/update-docs.yml
with:
output_folder: ${{ inputs.output_folder }}
secrets: inherit