Skip to content

Commit 848841b

Browse files
jas4711lazka
authored andcommitted
CI: add a GitLab example
1 parent a86a7a2 commit 848841b

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

web/docs/ci.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,36 @@ jobs:
4040
For more details on the 'msys2/setup-msys2' action and all the available options
4141
see https://github.com/marketplace/actions/setup-msys2
4242
43+
## GitLab
44+
45+
GitLab offers [shared Windows runners](https://docs.gitlab.com/ee/ci/runners/saas/windows_saas_runner.html)
46+
with some [pre-installed software](https://gitlab.com/gitlab-org/ci-cd/shared-runners/images/gcp/windows-containers/blob/main/cookbooks/preinstalled-software/README.md)
47+
and you can build a project using the following `.gitlab-ci.yml`
48+
snippet, which illustrates how to build a regular autotools-based
49+
project. See [GitLab's CI/CD documentation](https://docs.gitlab.com/ee/topics/build_your_application.html)
50+
for general reference on CI/CD in GitLab.
51+
52+
```yaml
53+
Windows-MSYS2-UCRT64:
54+
# https://docs.gitlab.com/ee/ci/runners/saas/windows_saas_runner.html
55+
tags: [ shared-windows, windows-1809 ]
56+
script: # https://www.msys2.org/docs/ci/#gitlab
57+
- wget.exe -nv -O msys2.exe https://github.com/msys2/msys2-installer/releases/download/nightly-x86_64/msys2-base-x86_64-latest.sfx.exe
58+
- ./msys2.exe -y -oC:\
59+
- Remove-Item msys2.exe
60+
- $env:CHERE_INVOKING = 'yes'
61+
- $env:MSYSTEM = 'UCRT64' # https://www.msys2.org/docs/environments/
62+
- C:\msys64\usr\bin\bash -lc ' '
63+
- C:\msys64\usr\bin\bash -lc 'pacman --noconfirm -Syuu'
64+
- C:\msys64\usr\bin\bash -lc 'pacman --noconfirm -Syuu'
65+
- |
66+
C:\msys64\usr\bin\bash -lc '
67+
pacman --noconfirm -Syu git autoconf automake libtool make mingw-w64-ucrt-x86_64-gcc
68+
./bootstrap
69+
./configure
70+
make V=1 check VERBOSE=t'
71+
```
72+
4373
## Appveyor
4474

4575
Appveyor provides a MSYS2 installation on all their images under `C:\msys64`,

0 commit comments

Comments
 (0)