Skip to content

Commit d02a135

Browse files
committed
Add CI build
1 parent fb4d406 commit d02a135

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: GCCTimer CI
2+
3+
on:
4+
- push
5+
- pull_request
6+
- workflow_dispatch
7+
8+
jobs:
9+
build:
10+
strategy:
11+
matrix:
12+
os: [ubuntu-latest]
13+
gcc_compiler: [12.2.0]
14+
15+
fail-fast: false
16+
17+
runs-on: ${{matrix.os}}
18+
19+
steps:
20+
- name: Checkout gcctimer
21+
uses: actions/checkout@v4
22+
with:
23+
path: gcctimer
24+
- name: Install Linux packages
25+
run: |
26+
sudo apt update
27+
sudo apt install -y texlive-latex-base texinfo libfl2 libfl-dev bison flex curl make texinfo zlib1g-dev unzip wget bzip2 zip git bash automake libtool pkg-config upx
28+
# Flex is required, but even though it's in the GitHub runner image, and marked as installed
29+
# it's still missing some things, see https://github.com/orgs/community/discussions/45029
30+
31+
if [[ ${{ matrix.gcc_compiler }} == "12.2.0" ]]; then
32+
wget https://github.com/andrewwutw/build-djgpp/releases/download/v3.4/djgpp-linux64-gcc1220.tar.bz2
33+
bzcat djgpp-linux64-gcc1220.tar.bz2 | sudo tar -x --directory /usr/local
34+
else
35+
echo 'Unsupported version of GCC/DJGPP'
36+
exit 1
37+
fi
38+
39+
- name: Set DJGPP environment
40+
run: |
41+
echo 'compile_opts=--host=i586-pc-msdosdjgpp --prefix=/usr/local/djgpp PKG_CONFIG_PATH=/usr/local/djgpp/lib/pkgconfig' >> $GITHUB_ENV
42+
echo '/usr/local/djgpp/bin/' >> $GITHUB_PATH
43+
44+
- name: Install gcctimer
45+
run: |
46+
source /usr/local/djgpp/setenv
47+
pushd gcctimer
48+
make CC=gcc prefix=/usr/local/djgpp RANLIB=ranlib
49+
sudo env PATH="$PATH" make CC=gcc prefix=/usr/local/djgpp install
50+
popd

0 commit comments

Comments
 (0)