Skip to content

Commit

Permalink
ci: add Pelles-C compilation on GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
nemequ committed Sep 13, 2024
1 parent b295153 commit 1f620b3
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 15 deletions.
5 changes: 0 additions & 5 deletions .appveyor.bat
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
cd test

if "%COMPILER%"=="pelles" (
choco install pelles-c --version 11.0.2
"C:\Program Files\PellesC\Bin\povars64.bat"
pomake /F Makefile.pelles
)
if [%COMPILER%] == [msvc] (
if []==[%VS_VERSION%] (
"C:\Program Files (x86)\Microsoft Visual Studio\%VS_YEAR%\Community\VC\Auxiliary\Build\vcvarsall.bat" x86
Expand Down
2 changes: 0 additions & 2 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ environment:
- COMPILER: msvc
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
VS_YEAR: 2019
- COMPILER: pelles

- COMPILER: msvc
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
VS_YEAR: 2017
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,29 @@ jobs:
run: make generate
- name: Check for changes
run: git diff --exit-code

pelles-c:
runs-on: windows-latest
strategy:
matrix:
version:
# https://community.chocolatey.org/packages/pelles-c#versionhistory
# - "12.0.2"
- "11.0.2"
# - "10.0.6"
- "9.00.0.0"
# - "8.00.0.0" ## Installation times out.
steps:
- uses: actions/checkout@v2
- name: Install Pelles-C
uses: crazy-max/ghaction-chocolatey@v3
with:
args: install pelles-c --version "${{ matrix.version }}" --no-progress
- name: Compile
env:
CC: 'C:\Program Files\PellesC\bin\pocc.exe'
LD: 'C:\Program Files\PellesC\bin\polink.exe'
CFLAGS: '/IC:\Progra~1\PellesC\Include'
LDFLAGS: '/LIBPATH:C:\Progra~1\PellesC\lib /LIBPATH:C:\Progra~1\PellesC\Lib\Win64'
working-directory: test
run: make -f Makefile.pelles
8 changes: 4 additions & 4 deletions test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -262,12 +262,12 @@ Makefile.icl: Makefile

Makefile.pelles: Makefile
@echo -e "# Generated by Makefile. Do not edit.\r" > $@
@echo -e "CC = pocc\r" >> $@
@echo -e "LD = polink\r" >> $@
@echo -e "CC ?= pocc\r" >> $@
@echo -e "LD ?= polink\r" >> $@
@echo -e "\r" >> $@

@echo -e "CFLAGS = \r" >> $@
@echo -e "LDFLAGS = \r" >> $@
@echo -e "CFLAGS ?= \r" >> $@
@echo -e "LDFLAGS ?= \r" >> $@
@echo -e "\r" >> $@

@echo -e "TESTS = \x5c\r" >> $@
Expand Down
8 changes: 4 additions & 4 deletions test/Makefile.pelles
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Generated by Makefile. Do not edit.
CC = pocc
LD = polink
CC ?= pocc
LD ?= polink

CFLAGS =
LDFLAGS =
CFLAGS ?=
LDFLAGS ?=

TESTS = \
array-param.exe \
Expand Down

0 comments on commit 1f620b3

Please sign in to comment.