-
-
Notifications
You must be signed in to change notification settings - Fork 71
65 lines (65 loc) · 2.1 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: 'Main'
on:
workflow_call:
inputs:
mode:
type: string
emacs-package:
type: string
default: '["emacs-nox"]'
org-branch:
type: string
default: '["main"]'
python-version:
type: string
default: '["3.x"]'
jobs:
main:
runs-on: ubuntu-latest
strategy:
matrix:
mode: ${{ fromJSON(inputs.mode) }}
emacs-package: ${{ fromJSON(inputs.emacs-package) }}
org-branch: ${{ fromJSON(inputs.org-branch) }}
python-version: ${{ fromJSON(inputs.python-version) }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Emacs (${{ matrix.emacs-package }})
run: |
sudo apt-get update
sudo apt-get install -y ${{ matrix.emacs-package }}
- name: Install Org (${{ matrix.org-branch }})
run: |
git clone --depth 1 --single-branch --branch ${{ matrix.org-branch }} https://git.savannah.gnu.org/git/emacs/org-mode.git
cd org-mode
make autoloads
- name: Setup Python (${{ matrix.python-version }})
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Show Versions
run: |
lsb_release -a
emacs --version
emacs --batch -Q -L org-mode/lisp -f package-initialize -f org-version
python --version
- name: Remove Tangled
if: ${{ matrix.mode == 'test' }}
run: |
rm -r tangled
git status -s
- name: Tangle
run: |
emacs --batch -Q -L org-mode/lisp -f package-initialize -eval "(require 'ob-python)" -eval "(setq org-confirm-babel-evaluate nil)" -eval "(setq python-indent-guess-indent-offset-verbose nil)" ./readme.org -f org-babel-tangle
- name: Diff
if: ${{ matrix.mode == 'test' }}
run: |
git status -s
git diff --exit-code
- name: Archive Artifacts
if: ${{ matrix.mode == 'build' }}
uses: actions/upload-artifact@v3
with:
name: 'miryoku_babel'
path: tangled