Skip to content

Commit

Permalink
Split macos and linux workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
electricbrass committed Sep 27, 2024
1 parent 74049dc commit e4f4732
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 51 deletions.
91 changes: 91 additions & 0 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Wcalc CI

on:
push:
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:
runs-on: ubuntu-latest

steps:
# Checks-out repository under $GITHUB_WORKSPACE:
- name: Check out repository code
uses: actions/checkout@v4

- name: apt-get update
run: sudo apt-get update

- name: Install dependencies
run: sudo apt-get install -y
guile-2.2-dev
autoconf
automake
autopoint
bison
imagemagick
libgettextpo-dev
libgtk2.0-dev
netpbm
pstoedit
tgif
w3m
xauth
xsltproc
xvfb

- name: Install tgif dependencies
run: sudo apt-get install -y
libxmu-dev
xfonts-75dpi
gsfonts-x11

- name: Install pstoedit dependencies
run: sudo apt-get install -y
ghostscript

- name: Autogen
run: ./autogen.sh

- 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
run: echo "XVFB_RUN=xvfb-run --auto-servernum" >> $GITHUB_ENV

- name: Debug
run: |
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
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,14 @@ on:

jobs:
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 }}
runs-on: macos-latest

steps:
# Checks-out repository under $GITHUB_WORKSPACE:
- name: Check out repository code
uses: actions/checkout@v4

- name: Install Dependencies - macOS
if: runner.os == 'macOS'
- name: Install Dependencies
run: |
brew update
brew install autoconf
Expand All @@ -48,8 +42,7 @@ jobs:
brew install --cask xquartz
brew install xauth
- name: Homebrew netpbm workaround - macOS
if: runner.os == 'macOS'
- name: Homebrew netpbm workaround
run: |
# this ships with netpbm but was giving
# some colors names in the ppmtoxpm output
Expand All @@ -61,41 +54,6 @@ jobs:
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: 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
pstoedit
tgif
w3m
xauth
xsltproc
xvfb

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

- name: Install pstoedit dependencies - Linux
if: runner.os == 'Linux'
run: sudo apt-get install -y
ghostscript
- name: Autogen
run: ./autogen.sh
Expand All @@ -109,13 +67,8 @@ jobs:

- 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: xvfb-run - macOS
if: runner.os == 'macOS'
- name: xvfb-run
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
Expand Down

0 comments on commit e4f4732

Please sign in to comment.