chicken-package/.circleci/config.yml

31 lines
1.5 KiB
YAML

version: 2.1
orbs:
win: circleci/windows@2.2.0
jobs:
build:
executor: win/default
environment:
version: '5.2.0'
binaryversion: '11'
build: '5'
steps:
- checkout
- run: iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
- run: Install-Module -Name 7Zip4Powershell -Force -Scope CurrentUser
- run: choco install -y msys2
- run: |
$ProgressPreference = "SilentlyContinue"
Invoke-WebRequest -UseBasicParsing -Uri "https://code.call-cc.org/releases/$Env:version/chicken-$Env:version.tar.gz" -OutFile '.\chicken.tar.gz'
7z x chicken.tar.gz
7z x chicken.tar
Remove-Item -Force chicken.tar.gz
Remove-Item -Force chicken.tar
mv chicken-* chickenbuild
- run: C:\tools\msys64\usr\bin\env MSYSTEM=MINGW64 /bin/bash -l -c 'pacman -S --needed --noconfirm pactoys'
- run: C:\tools\msys64\usr\bin\env MSYSTEM=MINGW64 /bin/bash -l -c 'pacboy -Sy --needed --noconfirm binutils:x make:x gcc:x gettext:x readline:x'
- run: C:\tools\msys64\usr\bin\env MSYSTEM=MINGW64 /bin/bash -l -c "export CFLAGS='-O2 -Wno-unused-variable -Wno-unused-but-set-variable'; mingw32-make PLATFORM=mingw-msys ARCH=x86-64 PREFIX=C:/tools/chicken -C /c/Users/circleci/project/chickenbuild"
- run: .\build.ps1
- run: choco apikey --key $Env:CHOCO_API_KEY --source https://push.chocolatey.org
- run: choco push chicken.$Env:version.$Env:build.nupkg --source https://push.chocolatey.org