Binaries Windows (windows-winlibs) #37
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
name: Binaries Windows (windows-winlibs) | |
on: | |
workflow_dispatch: | |
branches: [ master ] | |
#env: | |
# VERSION: "091224b1" | |
jobs: | |
build: | |
runs-on: windows-2019 | |
name: Build on ${{ matrix.distro }} ${{ matrix.arch }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: extract version from src/evers.h using powershell | |
shell: pwsh | |
run: | | |
$pattern = '#define me(YEAR|MONTH|DAY)' | |
$extractedValues = Get-Content -Path "src\evers.h" | | |
Select-String -Pattern $pattern | | |
ForEach-Object { | |
# Split the line and get the third element (index 2) | |
$elements = $_.Line -split '\s+' | |
if ($elements.Count -ge 3) { | |
# Remove the quotes from the third element | |
$elements[2].Trim('"') | |
} | |
} | |
# Join the extracted values into a single string | |
$result = $extractedValues -join '' | |
# Set the VRS environment variable | |
$env:VERSION = $result | |
# Output the result | |
Write-Host "Extracted values: $env:VERSION" | |
echo "VERSION=$env:VERSION" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append | |
- name: download winlibs | |
shell: cmd | |
run: | | |
curl -OL https://github.com/brechtsanders/winlibs_mingw/releases/download/12.2.0-16.0.0-10.0.0-ucrt-r5/winlibs-i686-posix-dwarf-gcc-12.2.0-mingw-w64ucrt-10.0.0-r5.zip | |
unzip -q winlibs-i686-posix-dwarf-gcc-12.2.0-mingw-w64ucrt-10.0.0-r5.zip | |
PATH=%CD%\mingw32\bin;%PATH% | |
gcc --version | |
- name: compile bfs | |
shell: cmd | |
run: | | |
gcc --version | |
PATH=%CD%\mingw32\bin;%PATH% | |
gcc --version | |
mingw32-make -f win32winlibs.gmk bfs/exe | |
- name: compile mec | |
shell: cmd | |
run: | | |
PATH=%CD%\mingw32\bin;%PATH% | |
gcc --version | |
ld --version | |
mingw32-make -f win32winlibs.gmk mec | |
- name: compile mew | |
shell: cmd | |
run: | | |
PATH=%CD%\mingw32\bin;%PATH% | |
mingw32-make -f win32winlibs.gmk mew | |
- name: create mecb | |
shell: cmd | |
run: | | |
PATH=%CD%\mingw32\bin;%PATH% | |
mingw32-make -f win32winlibs.gmk mecb | |
- name: create mewb | |
shell: cmd | |
run: | | |
PATH=%CD%\mingw32\bin;%PATH% | |
mingw32-make -f win32winlibs.gmk mewb | |
- name: Make release | |
shell: pwsh | |
run: | | |
# $env:VERSION ='091224b1' | |
mkdir MicroEmacs09-${env:VERSION}-Windows | |
mkdir MicroEmacs09-${env:VERSION}-Windows/bin | |
cp bfs/bfs.exe MicroEmacs09-${env:VERSION}-Windows/bin/ | |
cp src/.win32winlibs-release-mew/mew32.exe MicroEmacs09-${env:VERSION}-Windows/bin/ | |
cp src/.win32winlibs-release-mec/mec32.exe MicroEmacs09-${env:VERSION}-Windows/bin/ | |
cp license.txt MicroEmacs09-${env:VERSION}-Windows/ | |
cp COPYING MicroEmacs09-${env:VERSION}-Windows/ | |
cp README-standalone.md MicroEmacs09-${env:VERSION}-Windows/ | |
cd jasspa | |
7z a macros.zip macros | |
cd .. | |
cp jasspa/macros.zip MicroEmacs09-${env:VERSION}-Windows/ | |
cp me*.exe MicroEmacs09-${env:VERSION}-Windows/ | |
- name: Upload Windows WinlibRelease files | |
uses: actions/upload-artifact@v4 | |
with: | |
name: MicroEmacs09-${{ env.VERSION }}-Windows | |
path: MicroEmacs09-${{ env.VERSION }}-Windows | |
- name: Make mecb release | |
shell: pwsh | |
run: | | |
mkdir MicroEmacs09-${env:VERSION}-Windows-mecb | |
mkdir MicroEmacs09-${env:VERSION}-Windows-mecb/bin | |
cp bfs/bfs.exe MicroEmacs09-${env:VERSION}-Windows-mecb/bin/ | |
cp mec*.exe MicroEmacs09-${env:VERSION}-Windows-mecb/bin/ | |
cp license.txt MicroEmacs09-${env:VERSION}-Windows-mecb/ | |
cp COPYING MicroEmacs09-${env:VERSION}-Windows-mecb/ | |
cp README-standalone.md MicroEmacs09-${env:VERSION}-Windows-mecb/ | |
- name: Upload mecb release files | |
uses: actions/upload-artifact@v4 | |
with: | |
name: MicroEmacs09-${{ env.VERSION }}-Windows-mecb | |
path: MicroEmacs09-${{ env.VERSION }}-Windows-mecb | |
- name: Make mewb release | |
shell: pwsh | |
run: | | |
mkdir MicroEmacs09-${env:VERSION}-Windows-mewb | |
mkdir MicroEmacs09-${env:VERSION}-Windows-mewb/bin | |
cp bfs/bfs.exe MicroEmacs09-${env:VERSION}-Windows-mewb/bin/ | |
cp mew*.exe MicroEmacs09-${env:VERSION}-Windows-mewb/bin/ | |
cp license.txt MicroEmacs09-${env:VERSION}-Windows-mewb/ | |
cp COPYING MicroEmacs09-${env:VERSION}-Windows-mewb/ | |
cp README-standalone.md MicroEmacs09-${env:VERSION}-Windows-mewb/ | |
- name: Upload mewb release files | |
uses: actions/upload-artifact@v4 | |
with: | |
name: MicroEmacs09-${{ env.VERSION }}-Windows-mewb | |
path: MicroEmacs09-${{ env.VERSION }}-Windows-mewb | |