xref: /curl/.github/workflows/curl-for-win.yml (revision 7398037a)
1# Copyright (C) Viktor Szakats
2#
3# SPDX-License-Identifier: curl
4---
5name: curl-for-win
6
7on:
8  push:
9    branches:
10      - master
11      - '*/ci'
12  pull_request:
13    branches:
14      - master
15
16concurrency:
17  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
18  cancel-in-progress: true
19
20permissions: {}
21
22env:
23  CW_NOGET: 'curl trurl'
24  CW_MAP: '0'
25  CW_JOBS: '3'
26  CW_NOPKG: '1'
27  DOCKER_CONTENT_TRUST: '1'
28
29jobs:
30  linux-musl-llvm:
31    runs-on: ubuntu-latest
32    timeout-minutes: 30
33    steps:
34      - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
35        with:
36          path: 'curl'
37          fetch-depth: 8
38      - name: 'build'
39        run: |
40          git clone --depth 1 https://github.com/curl/curl-for-win
41          mv curl-for-win/* .
42          export CW_CONFIG='-main-werror-linux-musl-x64'
43          export CW_REVISION='${{ github.sha }}'
44          . ./_versions.sh
45          docker trust inspect --pretty "${DOCKER_IMAGE}"
46          time docker pull "${DOCKER_IMAGE}"
47          docker images --digests
48          time docker run --volume "$(pwd):$(pwd)" --workdir "$(pwd)" \
49            --env-file <(env | grep -a -E \
50              '^(CW_|GITHUB_)') \
51            "${DOCKER_IMAGE}" \
52            sh -c ./_ci-linux-debian.sh
53
54  mac-clang:
55    runs-on: macos-latest
56    timeout-minutes: 30
57    steps:
58      - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
59        with:
60          path: 'curl'
61          fetch-depth: 8
62      - name: 'build'
63        run: |
64          git clone --depth 1 https://github.com/curl/curl-for-win
65          mv curl-for-win/* .
66          export CW_CONFIG='-main-werror-mac-x64'
67          export CW_REVISION='${{ github.sha }}'
68          sh -c ./_ci-mac-homebrew.sh
69
70  win-llvm:
71    runs-on: ubuntu-latest
72    steps:
73      - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
74        with:
75          path: 'curl'
76          fetch-depth: 8
77      - name: 'build'
78        run: |
79          git clone --depth 1 https://github.com/curl/curl-for-win
80          mv curl-for-win/* .
81          export CW_CONFIG='-main-werror-win-x64'
82          export CW_REVISION='${{ github.sha }}'
83          . ./_versions.sh
84          docker trust inspect --pretty "${DOCKER_IMAGE}"
85          time docker pull "${DOCKER_IMAGE}"
86          docker images --digests
87          time docker run --volume "$(pwd):$(pwd)" --workdir "$(pwd)" \
88            --env-file <(env | grep -a -E \
89              '^(CW_|GITHUB_)') \
90            "${DOCKER_IMAGE}" \
91            sh -c ./_ci-linux-debian.sh
92