-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgithub-release.yaml
More file actions
187 lines (156 loc) · 5.29 KB
/
github-release.yaml
File metadata and controls
187 lines (156 loc) · 5.29 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
# IGLA GitHub Actions Release Workflow
# ⲤⲀⲔⲢⲀ ⲪⲞⲢⲘⲨⲖⲀ: V = n × 3^k × π^m × φ^p × e^q
# PHOENIX = 999 = 3³ × 37
name: Release IGLA
on:
push:
tags:
- 'v*'
env:
IGLA_VERSION: 3.0.0
PHOENIX: 999
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Zig
uses: goto-bus-stop/setup-zig@v2
with:
version: 0.13.0
- name: Build Compiler
run: |
cd src/vibeec
zig build -Doptimize=ReleaseFast
- name: Build Python Bindings
run: |
cd bindings/python
zig build-lib igla_lib.zig -dynamic -O ReleaseFast -femit-bin=libigla.so
- name: Build WASM
run: |
cd bindings/wasm
zig build-exe igla.zig -target wasm32-freestanding -O ReleaseFast -fno-entry
- name: Run Tests
run: |
cd src/vibeec
zig test parser.zig
zig test codegen.zig
zig test pas.zig
- name: Package Release
run: |
mkdir -p dist
cp src/vibeec/zig-out/bin/vibeec dist/
cp bindings/python/libigla.so dist/
cp bindings/python/igla.py dist/
cp bindings/wasm/igla.wasm dist/
tar -czvf igla-${{ env.IGLA_VERSION }}-linux-x86_64.tar.gz -C dist .
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: igla-linux-x86_64
path: igla-${{ env.IGLA_VERSION }}-linux-x86_64.tar.gz
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Setup Zig
uses: goto-bus-stop/setup-zig@v2
with:
version: 0.13.0
- name: Build Compiler
run: |
cd src/vibeec
zig build -Doptimize=ReleaseFast
- name: Build Python Bindings
run: |
cd bindings/python
zig build-lib igla_lib.zig -dynamic -O ReleaseFast -femit-bin=libigla.dylib
- name: Package Release
run: |
mkdir -p dist
cp src/vibeec/zig-out/bin/vibeec dist/
cp bindings/python/libigla.dylib dist/
cp bindings/python/igla.py dist/
tar -czvf igla-${{ env.IGLA_VERSION }}-macos-arm64.tar.gz -C dist .
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: igla-macos-arm64
path: igla-${{ env.IGLA_VERSION }}-macos-arm64.tar.gz
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup Zig
uses: goto-bus-stop/setup-zig@v2
with:
version: 0.13.0
- name: Build Compiler
run: |
cd src/vibeec
zig build -Doptimize=ReleaseFast
- name: Build Python Bindings
run: |
cd bindings/python
zig build-lib igla_lib.zig -dynamic -O ReleaseFast -femit-bin=igla.dll
- name: Package Release
run: |
mkdir dist
copy src\vibeec\zig-out\bin\vibeec.exe dist\
copy bindings\python\igla.dll dist\
copy bindings\python\igla.py dist\
Compress-Archive -Path dist\* -DestinationPath igla-${{ env.IGLA_VERSION }}-windows-x86_64.zip
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: igla-windows-x86_64
path: igla-${{ env.IGLA_VERSION }}-windows-x86_64.zip
release:
needs: [build-linux, build-macos, build-windows]
runs-on: ubuntu-latest
steps:
- name: Download Artifacts
uses: actions/download-artifact@v4
- name: Create Release
uses: softprops/action-gh-release@v1
with:
name: IGLA v${{ env.IGLA_VERSION }} - PHOENIX ${{ env.PHOENIX }}
body: |
## IGLA v${{ env.IGLA_VERSION }}
**ⲤⲀⲔⲢⲀ ⲪⲞⲢⲘⲨⲖⲀ:** V = n × 3^k × π^m × φ^p × e^q
**PHOENIX:** 999 = 3³ × 37
### Downloads
- Linux x86_64: `igla-${{ env.IGLA_VERSION }}-linux-x86_64.tar.gz`
- macOS ARM64: `igla-${{ env.IGLA_VERSION }}-macos-arm64.tar.gz`
- Windows x86_64: `igla-${{ env.IGLA_VERSION }}-windows-x86_64.zip`
### Included
- `vibeec` - IGLA compiler
- `libigla.so/dylib/dll` - Python bindings
- `igla.py` - Python wrapper
- `igla.wasm` - WebAssembly module
files: |
igla-linux-x86_64/*
igla-macos-arm64/*
igla-windows-x86_64/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
docker:
needs: [build-linux]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push
uses: docker/build-push-action@v5
with:
context: .
file: deploy/Dockerfile
push: true
tags: |
ghcr.io/${{ github.repository }}:${{ env.IGLA_VERSION }}
ghcr.io/${{ github.repository }}:latest