Skip to content

Commit

Permalink
CI: Try to add a GitHub workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
fernzi committed Jun 7, 2024
1 parent 5d26068 commit ac48573
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: CI

on:
pull_request:
branches:
- master
paths:
- 'etc/ci/*'
- 'src/*.toml'
push:
branches:
- master
paths:
- 'etc/ci/*'
- 'src/*.toml'

jobs:
build:
name: Build ${{ matrix.fontname }} Font
runs-on: ubuntu-latest
strategy:
matrix:
fontname:
- Iosevkins
- IosevkinsMichi

steps:
- uses: actions/setup-node@v4
with:
node-version: lts/*

- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends ttfautohint
- uses: actions/checkout@v4

- name: Fetch Submodules
run: git submodule update --init --recursive --depth 1

- name: Configure
run: etc/ci/configure

- name: Build
run: etc/ci/build ${{ matrix.fontname }}

- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.fontname }}
path: lib/iosevka/dist/*
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@
!/LICENSE
!/README.md

!/.github/workflows/*.yaml
!/etc/ci/*

!*.toml
5 changes: 5 additions & 0 deletions etc/ci/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh -efu
cd lib/iosevka
for font in "$@"; do
npm run build -- "ttf::$font" "ttf-unhinted::$font"
done
4 changes: 4 additions & 0 deletions etc/ci/configure
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh -eu
cat src/*.toml > lib/iosevka/private-build-plans.toml
cd lib/iosevka
npm install

0 comments on commit ac48573

Please sign in to comment.