Skip to content

Commit

Permalink
Merge pull request #25 from dmcmahill/ci-migration
Browse files Browse the repository at this point in the history
ci migration
  • Loading branch information
dmcmahill authored Apr 25, 2022
2 parents 281e9f8 + 4cb1616 commit 27658b9
Show file tree
Hide file tree
Showing 8 changed files with 397 additions and 93 deletions.
165 changes: 114 additions & 51 deletions .github/workflows/ci-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,90 +2,153 @@ name: Wcalc CI

on:
push:
branches: [ develop ]
branches:
- develop
- 'dev-*'
- 'ci-*'
pull_request:
branches: [ develop ]
schedule:
# minute hour day month weekday
- cron: '15 1 1 * *'
# Allows you to run this workflow manually from the Actions tab:
workflow_dispatch:

jobs:
build-ubuntu:
# "ubuntu-latest" == ubuntu-20.04 ('focal'):
runs-on: ubuntu-latest
build:
strategy:
matrix:
# "ubuntu-latest" == ubuntu-20.04 ('focal'):
# windows-latest isn't really supported at this time by wcalc
os: [macos-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}

steps:
# Checks-out repository under $GITHUB_WORKSPACE:
- name: Check out repository code
uses: actions/checkout@v3
- name: apt-get update

- name: Install Dependencies - macOS
if: runner.os == 'macOS'
run: |
brew update
brew install autoconf
brew install automake
brew install coreutils
brew install gawk
brew install gettext
brew install gtk+
brew install imagemagick
brew install netpbm
brew install pstoedit
brew install tgif
brew install util-linux
brew install w3m
brew install libxslt
brew install --cask xquartz
brew install xauth
- name: Homebrew netpbm workaround - macOS
if: runner.os == 'macOS'
run: |
# this ships with netpbm but was giving
# some colors names in the ppmtoxpm output
# that
# convert --colors 16 foo.xpm foo_16.ppm
# didn't like
#RGBDEF="$(brew list netpbm | grep rgb.txt)"
# but this one from XQuartz seems to work
RGBDEF=/opt/X11/share/X11/rgb.txt
echo "Setting: RGBDEF=${RGBDEF}"
echo "RGBDEF=${RGBDEF}" >> $GITHUB_ENV
- name: apt-get update - Linux
if: runner.os == 'Linux'
run: sudo apt-get update
- name: apt-get install

- name: Install dependencies - Linux
if: runner.os == 'Linux'
run: sudo apt-get install -y
guile-2.2-dev
autoconf
automake
autopoint
bison
imagemagick
libgettextpo-dev
libgtk2.0-dev
netpbm
# need newer version
#pstoedit
w3m
xauth
xsltproc
# for tgif
xvfb

- name: Install tgif dependencies - Linux
if: runner.os == 'Linux'
run: sudo apt-get install -y
libxmu-dev
xfonts-75dpi
gsfonts-x11
# for pstoedit

# we need a newer pstoedit
- name: Install pstoedit dependencies - Linux
if: runner.os == 'Linux'
run: sudo apt-get install -y
ghostscript
#gcc-8
#g++-8

# really should figure out how to cache this:
- name: install pstoedit
run: ./travis/install-pstoedit.sh
- name: Install pstoedit - Linux
if: runner.os == 'Linux'
run: |
./ci-scripts/install-pstoedit.sh
echo "PSTOEDIT=/usr/bin/pstoedit-3.75" >> $GITHUB_ENV
- name: install tgif
run: ./travis/install-tgif.sh
- name: Install tgif - Linux
if: runner.os == 'Linux'
run: ./ci-scripts/install-tgif.sh

- name: autogen
- name: Autogen
run: ./autogen.sh

- name: configure
run: ./configure PSTOEDIT=/usr/bin/pstoedit-3.75
- name: Post-autogen workarounds
run: |
touch intl/ChangeLog
- name: Configure
run: ./configure

- name: Default xvfb-run
run: echo "XVFB_RUN=" >> $GITHUB_ENV

- name: xvfb-run - Linux
if: runner.os == 'Linux'
run: echo "XVFB_RUN=xvfb-run --auto-servernum" >> $GITHUB_ENV

- name: build
run: make
- name: xvfb-run - macOS
if: runner.os == 'macOS'
run: |
echo "XVFB_RUN=ci-scripts/xvfb-run --auto-servernum --error-file xvfb-run-errors.log" >> $GITHUB_ENV
echo "PATH=/opt/X11/bin:/usr/local/opt/util-linux/bin:${PATH}" >> $GITHUB_ENV
- name: distcheck
run: make distcheck
# Xvfb really wants this directory to exist and be owned by root
sudo mkdir -p -m1777 /tmp/.X11-unix
build-macos:
runs-on: macos-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Install Dependencies
- name: Debug
run: |
brew update
brew install --cask microsoft-edge
brew install autoconf
brew install automake
brew install autopoint
brew install libgettextpo-dev
brew install libgtk2.0-dev
brew install netpbm
brew install pstoedit
brew install tgif
brew install w3m
brew install xsltproc
- name: autogen
run: ./autogen.sh

- name: configure
run: ./configure

- name: build
run: make
bison --version
convert --version
ls -l $(which tgif)
- name: Build
run: |
echo "Running: $XVFB_RUN make"
$XVFB_RUN make
- name: Test stdio-wcalc
run: cd stdio-wcalc && ./run_tests.sh --show-diffs

- name: Distcheck
run: |
echo "Running: $XVFB_RUN make distcheck"
$XVFB_RUN make distcheck
- name: distcheck
run: make distcheck
6 changes: 3 additions & 3 deletions autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ if test $rc -ne 0 ; then
exit 1
fi
lt_ver=`${LIBTOOLIZE} --version | awk '{print $NF; exit}'`
lt_maj=`echo $lt_ver | sed 's;\..*;;g'`
lt_min=`echo $lt_ver | sed -e 's;^[0-9]*\.;;g' -e 's;\..*$;;g'`
lt_teeny=`echo $lt_ver | sed -e 's;^[0-9]*\.[0-9]*\.;;g'`
lt_maj=`echo $lt_ver | sed 's;[.].*;;g'`
lt_min=`echo $lt_ver | sed -e 's;^[0-9]*[.];;g' -e 's;[.].*$;;g'`
lt_teeny=`echo $lt_ver | sed -e 's;^[0-9]*[.][0-9]*[.];;g'`
echo " $lt_ver"

case $lt_maj in
Expand Down
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 27658b9

Please sign in to comment.