File tree Expand file tree Collapse file tree 1 file changed +86
-0
lines changed
Expand file tree Collapse file tree 1 file changed +86
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Windows Build
2+ on :
3+ workflow_dispatch :
4+ push :
5+ branches :
6+ - main
7+ paths-ignore :
8+ - .github/workflows/docker.yml
9+ pull_request :
10+ branches :
11+ - main
12+ paths-ignore :
13+ - .github/workflows/docker.yml
14+
15+ jobs :
16+ build :
17+ runs-on : ubuntu-latest
18+ name : build (${{ matrix.config.name }})
19+ strategy :
20+ # needs to be set; reduce if github is cancelling jobs
21+ max-parallel : 2
22+ matrix :
23+ config :
24+ - name : " windows portable"
25+ container : " ghcr.io/scrubbbbs/mxe:latest"
26+ submodules : false
27+ deps : " "
28+ cmake_flags : " "
29+ env : " "
30+
31+ container :
32+ image : ${{ matrix.config.container }}
33+ credentials :
34+ username : ${{ github.actor }}
35+ password : ${{ secrets.GITHUB_TOKEN }}
36+
37+ steps :
38+ - uses : actions/checkout@v4
39+ with :
40+ ref : ${{ github.event.pull_request.head.sha }}
41+
42+ - name : Allow unsafe git in container
43+ run : git config --global --add safe.directory ${GITHUB_WORKSPACE}
44+
45+ - name : Checkout submodules
46+ if : matrix.config.submodules
47+ run : |
48+ git submodule init
49+ git submodule update
50+
51+ # - name: Install build dependencies
52+ # run: |
53+ # sudo apt-get update
54+
55+ - name : Configure
56+ run : |
57+ source /build/mxe.env
58+ ${{ matrix.config.env }} qmake
59+
60+ - name : Build
61+ run : |
62+ source /build/mxe.env
63+ ${{ matrix.config.env } make -j$(nproc)
64+
65+ - name : Get Build Info
66+ id : get_version
67+ shell : bash
68+ run : |
69+ ARCH="x86_64"
70+ OS=windows
71+ SHA=$(git rev-parse --short ${{ github.event.pull_request.head.sha || github.sha }})
72+ VERSION=$(cat _win32/git.h | grep CBIRD_VERSION | sed 's/[^0-9\.]*//g')
73+ echo "BUILD=${VERSION}-${SHA}-${OS}-${ARCH}" >> $GITHUB_OUTPUT
74+
75+ - name : Build Portable App
76+ run : |
77+ source /build/mxe.env
78+ make install
79+
80+ - name : Upload Artifacts
81+ uses : actions/upload-artifact@v4
82+ with :
83+ name : " cbird-win.${{ steps.get_version.outputs.BUILD }}-${{ matrix.config.name }}"
84+ path : _win32/cbird-win
85+ retention-days : 30
86+
You can’t perform that action at this time.
0 commit comments