1- name : Flex Installer
1+ name : Base Installer
22on :
33 push :
4- branches : ["release/9.1", "develop", "master", "feature/PubSub ", "feature/gha-cd"]
5- workflow_call :
4+ branches : ["release/9.3 ", "feature/gha-cd"]
5+ workflow_dispatch :
66 inputs :
7- flex_ref :
8- description : The tag/branch/sha to build
9- default : ' release/9.1'
7+ fw_ref :
8+ description : ' Commit-ish (branch, tag, SHA) to checkout for the main repository'
109 required : false
11- type : string
10+ default : ' '
11+ helps_ref :
12+ description : ' Commit-ish for helps repository'
13+ required : false
14+ default : ' develop'
1215 installer_ref :
13- description : The tag/branch/sha for the installer
14- default : ' feature/netfx48IdFix'
16+ description : ' Commit-ish for PatchableInstaller repository'
1517 required : false
16- type : string
17- helps_ref :
18- description : The tag or branch for helps
1918 default : ' master'
19+ localizations_ref :
20+ description : ' Commit-ish for localization repository'
2021 required : false
21- type : string
22+ default : ' develop '
2223 lcm_ref :
23- description : The tag or branch for liblcm (for localization)
24- default : ' master'
24+ description : ' Commit-ish for liblcm repository'
2525 required : false
26- type : string
27- l10n_ref :
28- description : The tag or branch for FieldWorks localizations
2926 default : ' master'
27+ s3_copy :
28+ description : ' Copy this build result to S3'
3029 required : false
31- type : string
30+ default : false
3231
3332concurrency :
3433 group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
@@ -38,49 +37,47 @@ jobs:
3837 debug_build_and_test :
3938 env :
4039 CROWDIN_API_KEY : ${{ secrets.FLEX_CROWDIN_API }}
41- LcmLocalArtifactsDir : ${{ github.workspace }}\Localizations\LCM\artifacts\Debug
42- LcmRootDir : ${{ github.workspace }}\Localizations\LCM
43- FILESTOSIGNLATER : " ${{ github.workspace }}\\ filesToSign"
4440 name : Build Debug and run Tests
4541 runs-on : windows-latest
4642 steps :
4743 - name : Checkout Files
4844 uses : actions/checkout@v4
45+ id : checkout
4946 with :
50- ref : ${{ inputs.flex_ref }}
51-
52- - name : Downgrade Wix Toolset
53- shell : cmd
54- run : choco install wixtoolset --version 3.11.2 --allow-downgrade --force
55-
56- - name : Checkout Installer
47+ ref : ${{ github.event.inputs.fw_ref || github.ref }}
48+ fetch-depth : 0
49+ - name : Checkout Helps
5750 uses : actions/checkout@v4
51+ id : helps-checkout
5852 with :
59- repository : sillsdev/genericinstaller
60- ref : ${{ inputs.installer_ref || 'feature/netfx48IdFix ' }}
61- path : PatchableInstaller
62-
63- - name : Checkout Helps
53+ repository : ' sillsdev/FwHelps '
54+ ref : ${{ github.event. inputs.helps_ref || 'develop ' }}
55+ fetch-depth : 0
56+ path : ' DistFiles/Helps '
57+ - name : Checkout PatchableInstaller
6458 uses : actions/checkout@v4
59+ id : installer-checkout
6560 with :
66- repository : sillsdev/FwHelps
67- ref : ${{ inputs.helps_ref || 'develop ' }}
68- path : DistFiles/Helps
69-
61+ repository : ' sillsdev/genericinstaller '
62+ ref : ${{ github.event. inputs.installer_ref || 'master ' }}
63+ fetch-depth : 0
64+ path : ' PatchableInstaller '
7065 - name : Checkout Localizations
7166 uses : actions/checkout@v4
67+ id : loc-checkout
7268 with :
73- repository : sillsdev/FwLocalizations
74- ref : ${{ inputs.l10n_ref || 'master ' }}
75- path : Localizations
76-
77- - name : Checkout liblcm (for l10n)
69+ repository : ' sillsdev/FwLocalizations'
70+ ref : ${{ github.event. inputs.localizations_ref || 'develop ' }}
71+ fetch-depth : 0
72+ path : ' Localizations '
73+ - name : Checkout liblcm
7874 uses : actions/checkout@v4
75+ id : liblcm-checkout
7976 with :
80- repository : sillsdev/liblcm
81- ref : ${{ inputs.lcm_ref || 'master' }}
82- path : Localizations/LCM
83-
77+ repository : ' sillsdev/liblcm'
78+ ref : ${{ github.event. inputs.installer_ref || 'master' }}
79+ fetch-depth : 0
80+ path : ' Localizations/LCM '
8481
8582 - name : Download 461 targeting pack
8683 uses : suisei-cn/actions-download-file@818d6b7dc8fe73f2f924b6241f2b1134ca1377d9 # 1.6.0
@@ -93,17 +90,33 @@ jobs:
9390 shell : cmd
9491 working-directory : public
9592 run : NDP461-DevPack-KB3105179-ENU.exe /q
96-
93+
9794 - name : Setup dotnet
98- uses : actions/setup-dotnet@v3
95+ uses : actions/setup-dotnet@v4
9996 with :
100- dotnet-version : 5.0.x
101-
102- - name : Build installer
103- shell : powershell
97+ dotnet-version : |
98+ 2.1.x
99+ 3.1.x
100+ 5.0.x
101+ - name : Install Overcrowdin
102+ shell : cmd
103+ run : |
104+ dotnet tool update -g overcrowdin || dotnet tool install -g overcrowdin
105+ - name : Prepare for build
106+ shell : cmd
104107 working-directory : Build
105- run : ./ build64.bat /t:BuildBaseInstaller /p:config=release /p:action=test /p:desktopNotAvailable=true /v:d /bl ^| tee-object -FilePath build.log
108+ run : build64.bat /t:WriteNonlocalDevelopmentPropertiesFile
106109
110+ - name : Build Debug and run tests
111+ id : build_installer
112+ shell : powershell
113+ run : |
114+ cd Build
115+ .\build64.bat /t:BuildBaseInstaller /property:config=release;action=test;desktopNotAvailable=true /v:d /bl ^| tee-object -FilePath build.log
116+ cd ..
117+ cd BuildDir
118+ md5sum *.exe > md5.txt
119+
107120 - name : Scan Debug Build Output
108121 shell : powershell
109122 working-directory : Build
@@ -125,16 +138,26 @@ jobs:
125138 run : .\NUnitReport /a ^| tee-object -FilePath test-results.log
126139
127140 - name : Report Test Results
128- uses : sillsdev/fw-nunitreport-action@v1 .0.0
141+ uses : sillsdev/fw-nunitreport-action@v2 .0.0
129142 with :
130143 log-path : Build/test-results.log
131144 token : ${{ secrets.GITHUB_TOKEN }}
132-
145+
146+ - name : Copy to S3
147+ if : ${{ github.event.inputs.s3_copy }}
148+ env :
149+ AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
150+ AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
151+ AWS_REGION : us-east-1
152+ S3_BUCKET : flex-updates
153+ S3_KEY : base-build/artifact.tar.gz
154+ run : |
155+ tar -czf artifact.tar.gz BuildDir
156+ aws s3 cp artifact.tar.gz s3://$S3_BUCKET/$S3_KEY
157+
133158 - uses : actions/upload-artifact@v4
134159 with :
135160 name : build-logs
136161 path : |
137162 Build/*.log
138- **/*.binlog
139- **/*.msi
140- if : always()
163+ Build/*.binlog
0 commit comments