Skip to content

Commit

Permalink
Add CI & Release workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ak-coram committed Jul 13, 2023
1 parent ae200b5 commit 4e5a3d2
Show file tree
Hide file tree
Showing 2 changed files with 130 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
schedule:
- cron: '0 0 1 * *'

jobs:
test:
name: ${{ matrix.lisp }} / ${{ matrix.quicklisp-dist }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
lisp: [sbcl-bin, ccl-bin/1.12.1, ecl/21.2.1]
os: [ubuntu-latest, windows-latest, macos-latest]
quicklisp-dist:
- quicklisp
- ultralisp
exclude:
- os: windows-latest
lisp: ccl-bin/1.12.1
- os: windows-latest
lisp: ecl/21.2.1
env:
LISP: ${{ matrix.lisp }}
QUICKLISP_DIST: ${{ matrix.quicklisp-dist }}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup Lisp
continue-on-error: true
uses: 40ants/setup-lisp@v2
with:
qlfile-template: |
{% ifequal quicklisp_dist "ultralisp" %}
dist ultralisp http://dist.ultralisp.org
{% endifequal %}
- name: Run tests (Non-Windows)
if: runner.os != 'Windows'
shell: bash
run: |
ros install neil-lindquist/ci-utils
ros run --eval '(ql:quickload :chronogram/make-dist)' --eval '(progn (chronogram-dist:make-dist) (uiop:quit))'
run-fiveam -e t -l chronogram/test :chronogram
- name: Run tests (Windows)
if: runner.os == 'Windows'
shell: msys2 {0}
run: |
ros install neil-lindquist/ci-utils
ros run --eval '(ql:quickload :chronogram/make-dist)' --eval '(progn (chronogram-dist:make-dist) (uiop:quit))'
run-fiveam -e t -l chronogram/test :chronogram
72 changes: 72 additions & 0 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Release

on:
push:
tags:

jobs:
release:
name: Build chronogram-dist and package for release
runs-on: ubuntu-latest
env:
LISP: sbcl-bin
QUICKLISP_DIST: ultralisp

steps:
- uses: actions/checkout@v3
with:
submodules: true

- name: Setup Lisp
continue-on-error: true
uses: 40ants/setup-lisp@v2
with:
qlfile-template: |
{% ifequal quicklisp_dist "ultralisp" %}
dist ultralisp http://dist.ultralisp.org
{% endifequal %}
- name: Build make-chronogram-dist
shell: bash
run: |
ros run --eval '(progn (ql:quickload :chronogram/make-dist) (asdf:make :chronogram/make-dist))'
- name: Run make-chronogram-dist
shell: bash
run: |
./make-chronogram-dist
- name: Push dist to ultralisp branch
uses: stefanzweifel/git-auto-commit-action@v4
if: startsWith(github.ref, 'refs/tags/')
with:
commit_message: Update dist for ultralisp
branch: ultralisp
commit_options: '--no-verify'
add_options: '-f'
file_pattern: 'chronogram-dist*'
push_options: '--force'
skip_dirty_check: true
skip_fetch: true
skip_checkout: true
create_branch: true
disable_globbing: false

- name: Package release
shell: bash
run: |
mkdir cl-chronogram
cp LICENSE README.org chronogram.asd CLDR_RELEASE *.lisp cl-chronogram/
cp -r chronogram-dist cl-chronogram/
zip -r cl-chronogram.zip cl-chronogram/
- uses: actions/upload-artifact@v3
with:
name: cl-chronogram
path: cl-chronogram/

- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: cl-chronogram.zip

0 comments on commit 4e5a3d2

Please sign in to comment.