-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 1e9e7b5
Showing
3 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Build | ||
|
||
on: workflow_dispatch | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: windows-latest | ||
strategy: | ||
fail-fast: false | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: msys2/setup-msys2@v2 | ||
with: | ||
msystem: UCRT64 | ||
update: true | ||
# install: git mingw-w64-x86_64-toolchain | ||
|
||
- name: Build x86 | ||
shell: cmd | ||
run: call build.bat x86 | ||
|
||
- name: Build x64 | ||
shell: cmd | ||
run: call build.bat | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: gnumake | ||
path: | | ||
./dist | ||
if-no-files-found: ignore # 'warn' or 'ignore' are also available, defaults to `warn` | ||
retention-days: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
make-* | ||
/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
@echo off | ||
|
||
set arch= | ||
set vcvars= | ||
|
||
:next-arg | ||
if "%1"=="" goto args-done | ||
if /i "%1"=="x86" set arch=x86&set vcvars=vcvars32.bat&goto arg-ok | ||
if /i "%1"=="x64" set arch=x64&set vcvars=vcvars64.bat&goto arg-ok | ||
|
||
:arg-ok | ||
shift | ||
goto next-arg | ||
|
||
:args-done | ||
if "%arch%" == "" set arch=x64& set vcvars=vcvars64.bat | ||
|
||
if exist "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\%vcvars%" ( | ||
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\%vcvars%" | ||
) else ( | ||
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\%vcvars%" | ||
) | ||
|
||
set Path=%Path%;C:\msys64\usr\bin | ||
|
||
set tag=4.3 | ||
set name=make-%tag% | ||
set zipname=%name%.zip | ||
|
||
echo tag: %tag% | ||
|
||
if not exist %zipname% powershell.exe -nologo -noprofile -command "& { (new-object System.Net.WebClient).DownloadFile('https://github.com/mirror/make/archive/refs/tags/%tag%.zip', '%zipname%'); exit !$?; }" | ||
if exist %name% rd /s /q %name% | ||
powershell.exe -nologo -noprofile -command "& { param([String]$sourceArchiveFileName, [String]$destinationDirectoryName); Add-Type -A 'System.IO.Compression.FileSystem'; Add-Type -A 'System.Text.Encoding'; [IO.Compression.ZipFile]::ExtractToDirectory($sourceArchiveFileName, $destinationDirectoryName, [System.Text.Encoding]::UTF8); exit !$?; }" -sourceArchiveFileName "%zipname%" -destinationDirectoryName "." | ||
|
||
cd "%name%" | ||
|
||
call bootstrap.bat | ||
call build_w32.bat | ||
cd .. | ||
if not exist .\dist mkdir .\dist | ||
copy /Y "%name%\WinRel\gnumake.exe" "dist\gnumake-msvc-%arch%.exe" |