-
Notifications
You must be signed in to change notification settings - Fork 3
85 lines (74 loc) · 2.88 KB
/
build.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
name: build
on:
workflow_call:
inputs:
name:
required: true
type: string
pkgarch:
required: false
type: string
default: x86_64
jobs:
build:
runs-on: windows-latest
steps:
- run: git config --global core.autocrlf input
- uses: actions/checkout@v4
- uses: cygwin/cygwin-install-action@master
with:
platform: ${{ inputs.pkgarch }}
packages: cygport,git,lzip,python3,cygwin=3.5.4-1
- name: Start cygserver
run: |
export PATH=/usr/bin:/usr/local/bin:$(cygpath ${SYSTEMROOT})/system32
cygserver-config --yes
cygrunsrv -S cygserver
cygrunsrv -V -Q cygserver
shell: C:\cygwin\bin\bash.exe --noprofile --norc -o igncr -eo pipefail '{0}'
continue-on-error: true
# some old x86 devel packages contain .la files, which can mess up builds
- name: Clean .la files
run: |
export PATH=/usr/bin:/usr/local/bin:$(cygpath ${SYSTEMROOT})/system32
wget -q https://gist.githubusercontent.com/jon-turney/0338af595313f598bfab15a0ac0df847/raw/bd0eeca6be899e7846aa988fbcf15e4e12f5f842/zp_libtool_cleanlafiles.sh -O /etc/postinstall/zp_libtool_cleanlafiles.sh
bash /etc/postinstall/zp_libtool_cleanlafiles.sh
shell: C:\cygwin\bin\bash.exe --noprofile --norc -o igncr -eo pipefail '{0}'
continue-on-error: true
- name: Build packages
run: |
export PATH=/usr/bin:/usr/local/bin:$(cygpath ${SYSTEMROOT})/system32
./scallywag --inputs '${{ toJson(github.event.client_payload) }}'
shell: bash --noprofile --norc -o igncr -eo pipefail '{0}'
env:
# knows too much about cygwin/cygwin-install-action internals
SETUP: C:\setup.exe
CYGWIN_ROOT: C:\cygwin
CYGWIN_MIRROR: http://mirrors.kernel.org/sourceware/cygwin/
CACHE: C:\cygwin-packages
BUILD: ${{ inputs.name }}
- name: Upload scallywag metadata
uses: actions/upload-artifact@v4
with:
name: 'metadata'
path: scallywag.json
if: ${{ always() && inputs.name == 'source' }}
# upload builddir for possible investigation of problems
- name: Upload builddir archive
uses: actions/upload-artifact@v4
with:
name: '${{ inputs.name }} builddir'
path: |
builddir.tar.xz
setup.log.full
if: ${{ !cancelled() }}
# on success, upload packages from staging
- name: Upload packages
uses: actions/upload-artifact@v4
with:
name: '${{ inputs.name }} packages'
path: staging
if-no-files-found: ignore
# workaround problems with actions/checkout post-run step using cygwin git
- name: Avoid actions/checkout post-run step using Cygwin git
run: bash -c 'rm /usr/bin/git.exe'