-
Notifications
You must be signed in to change notification settings - Fork 1
108 lines (90 loc) · 2.8 KB
/
Copy pathediting-in-progress.yml
File metadata and controls
108 lines (90 loc) · 2.8 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: Editing in Progress CI
on:
push:
paths:
- "editing-in-progress/**"
- ".github/workflows/editing-in-progress.yml"
pull_request:
paths:
- "editing-in-progress/**"
- ".github/workflows/editing-in-progress.yml"
workflow_dispatch:
permissions:
contents: read
env:
DENO_VERSION: 2.9.4
jobs:
verify:
name: Verify
runs-on: ubuntu-latest
defaults:
run:
working-directory: editing-in-progress
steps:
- name: Check out repository
uses: actions/checkout@v5
- name: Set up Deno
uses: denoland/setup-deno@v2
with:
deno-version: ${{ env.DENO_VERSION }}
- name: Install locked dependencies
run: deno install --frozen
- name: Check formatting
run: deno fmt --check
- name: Type-check
run: deno task check
- name: Run tests
run: deno task test
- name: Initialize pinned WebUI sidecar
env:
EIP_WEBUI_LIBRARY_PATH: native/x86_64-unknown-linux-gnu/libwebui-2.so
run: deno task check:webui
package:
name: Package ${{ matrix.target }}
needs: verify
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- x86_64-unknown-linux-gnu
- aarch64-unknown-linux-gnu
- x86_64-apple-darwin
- aarch64-apple-darwin
defaults:
run:
working-directory: editing-in-progress
steps:
- name: Check out repository
uses: actions/checkout@v5
- name: Set up Deno
uses: denoland/setup-deno@v2
with:
deno-version: ${{ env.DENO_VERSION }}
- name: Install locked dependencies
run: deno install --frozen
- name: Compile application
env:
EIP_TARGET: ${{ matrix.target }}
run: deno task build
- name: Assemble archive
env:
EIP_TARGET: ${{ matrix.target }}
run: |
set -euo pipefail
package="editing-in-progress-${EIP_TARGET}"
mkdir -p "package/${package}/lib"
cp "dist/${EIP_TARGET}/editing-in-progress" "package/${package}/"
cp "dist/${EIP_TARGET}/lib/"* "package/${package}/lib/"
cp README.md config.example.toml native/LICENSE.webui "package/${package}/"
tar -C package -czf "${package}.tar.gz" "${package}"
sha256sum "${package}.tar.gz" > "${package}.tar.gz.sha256"
- name: Upload executable package
uses: actions/upload-artifact@v4
with:
name: editing-in-progress-${{ matrix.target }}
path: |
editing-in-progress/editing-in-progress-${{ matrix.target }}.tar.gz
editing-in-progress/editing-in-progress-${{ matrix.target }}.tar.gz.sha256
if-no-files-found: error
compression-level: 0