Skip to content

Commit

Permalink
Fix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
otterdahl committed Feb 29, 2024
1 parent ee03a4d commit 5bc9ef6
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 3 deletions.
11 changes: 11 additions & 0 deletions .github/patches/gd.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/src/gd_out.c 2011-03-05 11:51:50.000000000 +0100
+++ b/src/gd_out.c 2021-02-23 15:23:00.434133429 +0100
@@ -212,6 +212,6 @@
* the right of the last character for the fixed width
* font.
*/
- return rect[2] - 1;
+ return rect[2] ? rect[2] - 1 : 0;
#endif
}

28 changes: 25 additions & 3 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
build-sxl-tlc:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Check out rsmp_sxl_traffic_lights repository (gh-pages)
uses: actions/checkout@v4
Expand All @@ -35,8 +35,30 @@ jobs:
imagemagick \
inkscape \
librsvg2-bin \
latexmk \
mscgen
latexmk
- name: Install dependencies for mscgen
run: |
sudo apt-get remove nginx
sudo apt-get remove libgd3
sudo apt-get -y install autoconf flex bison gcc make pkg-config libgd-dev
- name: Clone mscgen
run: git clone https://github.com/dok-net/mscgen.git
- name: Fetch patch for mscgen (fixes issue under Ubuntu 20.04)
run: |
cp .github/patches/gd.diff mscgen
cd mscgen
patch -p1 <gd.diff
- name: Compile and install mscgen
run: |
cd mscgen
chmod +x autogen.sh
chmod +x test/renderercheck.sh
./autogen.sh
autoupdate
./configure
make
make check
sudo make install
- name: Build rsmp_sxl_traffic_lights repository
run: |
cd 1.0.15
Expand Down

0 comments on commit 5bc9ef6

Please sign in to comment.