xref: /curl/.github/workflows/curl-for-win.yml (revision e53523fe)
1# Copyright (C) Viktor Szakats
2#
3# SPDX-License-Identifier: curl
4---
5name: curl-for-win
6
7'on':
8  push:
9    branches:
10      - master
11      - '*/ci'
12    paths-ignore:
13      - '**/*.md'
14      - '.circleci/**'
15      - 'appveyor.*'
16      - 'packages/**'
17      - 'plan9/**'
18      - 'projects/**'
19      - 'winbuild/**'
20  pull_request:
21    branches:
22      - master
23    paths-ignore:
24      - '**/*.md'
25      - '.circleci/**'
26      - 'appveyor.*'
27      - 'packages/**'
28      - 'plan9/**'
29      - 'projects/**'
30      - 'winbuild/**'
31
32concurrency:
33  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
34  cancel-in-progress: true
35
36permissions: {}
37
38env:
39  CW_NOGET: 'curl trurl'
40  CW_MAP: '0'
41  CW_JOBS: '5'
42  CW_NOPKG: '1'
43  DOCKER_CONTENT_TRUST: '1'
44
45jobs:
46  linux-glibc-llvm:
47    runs-on: ubuntu-latest
48    timeout-minutes: 30
49    steps:
50      - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
51        with:
52          path: 'curl'
53          fetch-depth: 8
54      - name: 'build'
55        run: |
56          git clone --depth 1 https://github.com/curl/curl-for-win
57          mv curl-for-win/* .
58          export CW_CONFIG='-main-werror-linux-a64-x64'
59          export CW_REVISION='${{ github.sha }}'
60          DOCKER_IMAGE='debian:bookworm-slim'
61          export CW_CCSUFFIX='-15'
62          export CW_GCCSUFFIX='-12'
63          docker trust inspect --pretty "${DOCKER_IMAGE}"
64          time docker pull "${DOCKER_IMAGE}"
65          docker images --digests
66          time docker run --volume "$(pwd):$(pwd)" --workdir "$(pwd)" \
67            --env-file <(env | grep -a -E \
68              '^(CW_|GITHUB_)') \
69            "${DOCKER_IMAGE}" \
70            sh -c ./_ci-linux-debian.sh
71
72  linux-musl-llvm:
73    runs-on: ubuntu-latest
74    timeout-minutes: 30
75    steps:
76      - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
77        with:
78          path: 'curl'
79          fetch-depth: 8
80      - name: 'build'
81        run: |
82          git clone --depth 1 https://github.com/curl/curl-for-win
83          mv curl-for-win/* .
84          export CW_CONFIG='-main-werror-linux-musl-r64-x64'
85          export CW_REVISION='${{ github.sha }}'
86          . ./_versions.sh
87          docker trust inspect --pretty "${DOCKER_IMAGE}"
88          time docker pull "${DOCKER_IMAGE}"
89          docker images --digests
90          time docker run --volume "$(pwd):$(pwd)" --workdir "$(pwd)" \
91            --env-file <(env | grep -a -E \
92              '^(CW_|GITHUB_)') \
93            "${DOCKER_IMAGE}" \
94            sh -c ./_ci-linux-debian.sh
95
96  mac-clang:
97    runs-on: macos-latest
98    timeout-minutes: 30
99    env:
100      CW_JOBS: '4'
101    steps:
102      - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
103        with:
104          path: 'curl'
105          fetch-depth: 8
106      - name: 'build'
107        run: |
108          git clone --depth 1 https://github.com/curl/curl-for-win
109          mv curl-for-win/* .
110          export CW_CONFIG='-main-werror-mac-x64'
111          export CW_REVISION='${{ github.sha }}'
112          sh -c ./_ci-mac-homebrew.sh
113
114  win-llvm:
115    runs-on: ubuntu-latest
116    steps:
117      - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
118        with:
119          path: 'curl'
120          fetch-depth: 8
121      - name: 'build'
122        run: |
123          git clone --depth 1 https://github.com/curl/curl-for-win
124          mv curl-for-win/* .
125          export CW_CONFIG='-main-werror-win-x64'
126          export CW_REVISION='${{ github.sha }}'
127          . ./_versions.sh
128          docker trust inspect --pretty "${DOCKER_IMAGE}"
129          time docker pull "${DOCKER_IMAGE}"
130          docker images --digests
131          time docker run --volume "$(pwd):$(pwd)" --workdir "$(pwd)" \
132            --env-file <(env | grep -a -E \
133              '^(CW_|GITHUB_)') \
134            "${DOCKER_IMAGE}" \
135            sh -c ./_ci-linux-debian.sh
136