-
Notifications
You must be signed in to change notification settings - Fork 3
148 lines (137 loc) · 4.75 KB
/
push.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
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
name: Build and Test
on: [push]
jobs:
download-libclang-dll:
runs-on: ubuntu-24.04
name: 'Download and Extract libclang.dll'
steps:
- uses: actions/checkout@v4
with:
repository: PucklaJ/odin-libclang
ref: '19.1.7'
- name: Setup Just
run: sudo apt -y install just
- name: Download libclang.dll
run: just download-library '' 'build/'
- name: Upload libclang.dll
uses: actions/upload-artifact@v4
with:
name: libclang.dll
path: ${{ github.workspace }}/build/libclang.dll
if-no-files-found: error
overwrite: true
compression-level: 0
retention-days: 1
build-and-test:
runs-on: ${{ matrix.os }}
needs: download-libclang-dll
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, windows-latest, macos-13, macos-14]
name: ${{ matrix.os == 'ubuntu-24.04' && 'linux-x86_64' || matrix.os == 'macos-13' && 'macos-x86_64' || matrix.os == 'macos-14' && 'macos-arm64' || 'windows-x86_64' }}
env:
plat: ${{ matrix.os == 'ubuntu-24.04' && 'linux-x86_64' || matrix.os == 'macos-13' && 'macos-x86_64' || matrix.os == 'macos-14' && 'macos-arm64' || 'windows-x86_64' }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: extractions/setup-just@v2
name: Install just
- name: Install libclang, llvm
run: |
sudo apt -y install libclang-18-dev libllvm18
sudo ln -rfs /usr/lib/x86_64-linux-gnu/libclang-18.so /usr/lib/x86_64-linux-gnu/libclang.so
sudo ln -rfs /usr/lib/llvm-18/lib/libLLVM.so.1 /usr/lib/libLLVM-18.so.18.1
if: matrix.os == 'ubuntu-24.04'
- name: Download libclang.dll
if: matrix.os == 'windows-latest'
uses: actions/download-artifact@v4
with:
name: libclang.dll
merge-multiple: true
path: build
- name: Install llvm
run: brew install llvm@19
if: matrix.os == 'macos-13' || matrix.os == 'macos-14'
- uses: laytan/setup-odin@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
release: dev-2025-01
- uses: ilammy/msvc-dev-cmd@v1
if: matrix.os == 'windows-latest'
- name: Test
uses: nick-fields/retry@v3
with:
command: just test
timeout_minutes: 2
retry_wait_seconds: 1
max_attempts: 1
- name: example/olivec
run: just example olivec
- name: Build runic release
run: just
if: matrix.os == 'macos-13' || matrix.os == 'macos-14'
- name: Build runic AppImage
run: |
mkdir appimagetool_bin/
just install-appimagetool appimagetool_bin/
export PATH=$(pwd)/appimagetool_bin/:$PATH
just package
if: matrix.os == 'ubuntu-24.04'
- name: Build runic release
if: matrix.os == 'windows-latest'
run: just
- name: Build runic installer
uses: Minionguyjpro/Inno-Setup-Action@v1.2.5
if: matrix.os == 'windows-latest'
with:
path: windows_installer.iss
- name: Rename runic artifact
run: mv build/runic build/runic.${{ env.plat }}
if: matrix.os == 'macos-13' || matrix.os == 'macos-14'
- uses: actions/upload-artifact@v4
if: matrix.os == 'macos-13' || matrix.os == 'macos-14'
with:
name: runic-${{ env.plat }}
path: ${{ github.workspace }}/build/runic.${{ env.plat }}
if-no-files-found: warn
overwrite: true
compression-level: 0
- uses: actions/upload-artifact@v4
if: matrix.os == 'ubuntu-24.04'
with:
name: runic-${{ env.plat }}
path: ${{ github.workspace }}/build/package/*
if-no-files-found: warn
overwrite: true
compression-level: 0
- uses: actions/upload-artifact@v4
if: matrix.os == 'windows-latest'
with:
name: runic-${{ env.plat }}
path: ${{ github.workspace }}/build/package/*
if-no-files-found: warn
overwrite: true
compression-level: 0
create-release:
runs-on: ubuntu-latest
needs: build-and-test
if: startsWith(github.ref, 'refs/tags/')
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
pattern: 'runic*'
merge-multiple: true
path: artifacts
- name: List all artifacts
run: ls -la --color=always artifacts
- uses: ncipollo/release-action@v1
with:
artifacts: 'artifacts/*'
body: |
Automatically generated by Github Actions Run ${{ github.run_id }}
generateReleaseNotes: true
makeLatest: true