-
Notifications
You must be signed in to change notification settings - Fork 3
100 lines (92 loc) · 3.3 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
name: Build and Test
on: [push]
jobs:
build-and-test:
runs-on: ${{ matrix.os }}
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: Copy libclang
run: |
New-Item -Path build -ItemType Directory
Copy-Item -Path .\shared\libclang\lib\windows\x86_64\libclang.dll -Destination .\build\
if: matrix.os == 'windows-latest'
- name: Install llvm
run: brew install llvm@18
if: matrix.os == 'macos-13' || matrix.os == 'macos-14'
- uses: laytan/setup-odin@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
release: dev-2024-11
- 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 != 'windows-latest'
- name: Build runic release
run: just package
if: matrix.os == 'windows-latest'
- name: Rename runic artifact
run: mv build/runic build/runic.${{ env.plat }}
if: matrix.os != 'windows-latest'
- uses: actions/upload-artifact@v4
if: matrix.os != 'windows-latest'
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 == 'windows-latest'
with:
name: runic-${{ env.plat }}
path: ${{ github.workspace }}/build/runic.*.zip
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:
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