Skip to content

Commit

Permalink
Add Pelles-C compilation to CI on GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
nemequ committed Sep 12, 2024
1 parent ea94459 commit 632bf72
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: "{build}"
branches:
except:
- /^(wip\/)?(travis|osx)(\-.+)?$/
- /^(wip\/)?(travis|osx|gha)(\-.+)?$/

environment:
matrix:
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
on:
push:
branches-ignore:
- 'ci/**'
- '!ci/gha**'
- 'dependabot/**'
pull_request:
branches:
- 'master'

jobs:
pelles:
runs-on: windows-latest
strategy:
matrix:
version:
- "12.0.2"
# - "11.0.2"
# - "10.0.6"
# - "9.00.0.0"
# - "8.00.0.0"
steps:
- uses: actions/checkout@v2
- name: Install Pelles
uses: crazy-max/ghaction-chocolatey@v3
with:
args: install pelles-c --version "${{ matrix.version }}"
- name: Install Make
uses: crazy-max/ghaction-chocolatey@v3
with:
args: install make
- name: Tmp
run: dir 'C:\ProgramData\chocolatey\lib\make\tools\install\bin'
- name: Compile
env:
POCC: 'C:\Program Files\PellesC\bin\pocc.exe'
POLINK: 'C:\Program Files\PellesC\bin\polink.exe'
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 @@ -249,12 +249,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
48 changes: 44 additions & 4 deletions test/Makefile.pelles
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
# Generated by Makefile. Do not edit.
CC = pocc
LD = polink
CC ?= pocc
LD ?= polink

CFLAGS =
LDFLAGS =
CFLAGS ?=
LDFLAGS ?=

TESTS = \
array-param.exe \
assume.exe \
cast.exe \
concat.exe \
const.exe \
constant.exe \
deprecated.exe \
empty-bases.exe \
fallthrough.exe \
flags.exe \
inline.exe \
likely.exe \
malloc.exe \
message.exe \
noinline.exe \
no-escape.exe \
no-return.exe \
non-null.exe \
predict.exe \
Expand All @@ -30,9 +33,11 @@ TESTS = \
sentinel.exe \
static-assert.exe \
stringify.exe \
unknown-cpp-attributes.exe \
unknown-pragmas.exe \
unavailable.exe \
unreachable.exe \
unused-function.exe \
visibility.exe \
warn.exe \
warn-unused-result.exe \
Expand All @@ -42,16 +47,19 @@ CLEANFILES = $(TESTS) \
array-param.obj array-param.exe \
assume.obj assume.exe \
cast.obj cast.exe \
concat.obj concat.exe \
const.obj const.exe \
constant.obj constant.exe \
deprecated.obj deprecated.exe \
empty-bases.obj empty-bases.exe \
fallthrough.obj fallthrough.exe \
flags.obj flags.exe \
inline.obj inline.exe \
likely.obj likely.exe \
malloc.obj malloc.exe \
message.obj message.exe \
noinline.obj noinline.exe \
no-escape.obj no-escape.exe \
no-return.obj no-return.exe \
non-null.obj non-null.exe \
predict.obj predict.exe \
Expand All @@ -63,9 +71,11 @@ CLEANFILES = $(TESTS) \
sentinel.obj sentinel.exe \
static-assert.obj static-assert.exe \
stringify.obj stringify.exe \
unknown-cpp-attributes.obj unknown-cpp-attributes.exe \
unknown-pragmas.obj unknown-pragmas.exe \
unavailable.obj unavailable.exe \
unreachable.obj unreachable.exe \
unused-function.obj unused-function.exe \
visibility.obj visibility.exe \
warn.obj warn.exe \
warn-unused-result.obj warn-unused-result.exe \
Expand Down Expand Up @@ -94,6 +104,12 @@ cast.obj: cast.c
cast.exe: cast.obj
$(LD) $(LDFLAGS) /OUT:cast.exe cast.obj

concat.obj: concat.c
$(CC) $(CFLAGS) concat.c

concat.exe: concat.obj
$(LD) $(LDFLAGS) /OUT:concat.exe concat.obj

const.obj: const.c
$(CC) $(CFLAGS) const.c

Expand All @@ -112,6 +128,12 @@ deprecated.obj: deprecated.c
deprecated.exe: deprecated.obj
$(LD) $(LDFLAGS) /OUT:deprecated.exe deprecated.obj

empty-bases.obj: empty-bases.c
$(CC) $(CFLAGS) empty-bases.c

empty-bases.exe: empty-bases.obj
$(LD) $(LDFLAGS) /OUT:empty-bases.exe empty-bases.obj

fallthrough.obj: fallthrough.c
$(CC) $(CFLAGS) fallthrough.c

Expand Down Expand Up @@ -154,6 +176,12 @@ noinline.obj: noinline.c
noinline.exe: noinline.obj
$(LD) $(LDFLAGS) /OUT:noinline.exe noinline.obj

no-escape.obj: no-escape.c
$(CC) $(CFLAGS) no-escape.c

no-escape.exe: no-escape.obj
$(LD) $(LDFLAGS) /OUT:no-escape.exe no-escape.obj

no-return.obj: no-return.c
$(CC) $(CFLAGS) no-return.c

Expand Down Expand Up @@ -220,6 +248,12 @@ stringify.obj: stringify.c
stringify.exe: stringify.obj
$(LD) $(LDFLAGS) /OUT:stringify.exe stringify.obj

unknown-cpp-attributes.obj: unknown-cpp-attributes.c
$(CC) $(CFLAGS) unknown-cpp-attributes.c

unknown-cpp-attributes.exe: unknown-cpp-attributes.obj
$(LD) $(LDFLAGS) /OUT:unknown-cpp-attributes.exe unknown-cpp-attributes.obj

unknown-pragmas.obj: unknown-pragmas.c
$(CC) $(CFLAGS) unknown-pragmas.c

Expand All @@ -238,6 +272,12 @@ unreachable.obj: unreachable.c
unreachable.exe: unreachable.obj
$(LD) $(LDFLAGS) /OUT:unreachable.exe unreachable.obj

unused-function.obj: unused-function.c
$(CC) $(CFLAGS) unused-function.c

unused-function.exe: unused-function.obj
$(LD) $(LDFLAGS) /OUT:unused-function.exe unused-function.obj

visibility.obj: visibility.c
$(CC) $(CFLAGS) visibility.c

Expand Down

0 comments on commit 632bf72

Please sign in to comment.