-
-
Notifications
You must be signed in to change notification settings - Fork 175
123 lines (109 loc) · 3.58 KB
/
windows-msvc.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
name: Windows MSVC
on:
push:
branches: [master]
paths:
- ".github/workflows/windows-msvc.yml"
- "gdk4/**"
- "gdk4-win32/**"
- "gsk4/**"
- "gtk4/**"
- "gtk4-macros/**"
pull_request:
paths:
- ".github/workflows/windows-msvc.yml"
- "gdk4/**"
- "gdk4-win32/**"
- "gsk4/**"
- "gtk4/**"
- "gtk4-macros/**"
workflow_dispatch:
jobs:
ci-msvc:
name: Windows MSVC
runs-on: windows-latest
env:
PKG_CONFIG_PATH: 'C:\gnome\lib\pkgconfig'
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
id: cache
with:
path: c:/gnome
key: ${{ runner.os }}-gtk4-14.3
restore-keys: |
${{ runner.os }}-gtk4-14.3
- name: Set up the PATH environment
run: |
echo "C:\pkg-config-lite-0.28-1\bin" >> $GITHUB_PATH
echo "C:\gnome\bin" >> $GITHUB_PATH
shell: bash
- name: Install pkgconfig-lite
run: |
Invoke-WebRequest -Uri https://deac-fra.dl.sourceforge.net/project/pkgconfiglite/0.28-1/pkg-config-lite-0.28-1_bin-win32.zip -OutFile /pkg_config_lite.zip -MaximumRetryCount 5
Expand-Archive /pkg_config_lite.zip -DestinationPath C:\
ls C:\
ls C:\pkg-config-lite-0.28-1
ls C:\pkg-config-lite-0.28-1\bin
pkg-config --version
- name: Clone GTK
working-directory: /
if: steps.cache.outputs.cache-hit != 'true'
run: |
git clone https://gitlab.gnome.org/GNOME/gtk.git --depth 1
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Install Python Dependencies
run: pip install meson ninja setuptools packaging
- name: Setup MSVC
uses: bus1/cabuild/action/msdevshell@v1
with:
architecture: x64
- name: Prepare GTK build
working-directory: /gtk
if: steps.cache.outputs.cache-hit != 'true'
run: |
meson setup builddir --prefix=C:/gnome -Dbackend_max_links=1 -Ddemos=false -Dbuild-tests=false -Dvulkan=disabled -Dmedia-gstreamer=disabled -Dbuild-examples=false -Dglib:tests=false -Dharfbuzz:tests=disabled -Dharfbuzz:docs=disabled -Dgraphene:tests=false -Dgdk-pixbuf:tests=false -Dcairo:tests=disabled
- name: Build and install GTK
working-directory: /gtk
if: steps.cache.outputs.cache-hit != 'true'
run: |
meson install -C builddir
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: clippy
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --features v4_14,xml_validation
- name: Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --features v4_14,xml_validation
- name: Tests
uses: actions-rs/cargo@v1
with:
command: test
args: --features v4_14,xml_validation
- name: Build gdk-win32
uses: actions-rs/cargo@v1
with:
command: build
args: --features egl,win32 --manifest-path ./gdk4-win32/Cargo.toml
- name: Clippy gdk-win32
uses: actions-rs/cargo@v1
with:
command: clippy
args: --features egl,win32 --manifest-path ./gdk4-win32/Cargo.toml
- name: Tests gdk-win32
uses: actions-rs/cargo@v1
with:
command: test
args: --features egl,win32 --manifest-path ./gdk4-win32/Cargo.toml