-
Notifications
You must be signed in to change notification settings - Fork 12
89 lines (87 loc) · 4.04 KB
/
release.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
name: Release
on:
push:
tags:
- "*.*.*"
jobs:
build-linux:
if: github.event.base_ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: goto-bus-stop/setup-zig@v1
with:
version: 0.9.0-dev.1675+3d528161c
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
shell: bash
- run: sudo apt install -y libcurl4-openssl-dev
- run: zig build
- run: zip -j fastfec-linux-x86_64-${{ steps.get_version.outputs.VERSION }}.zip zig-out/bin/fastfec
- run: mv zig-out/lib/libfastfec.so libfastfec-linux-x86_64-${{ steps.get_version.outputs.VERSION }}.so
- run: zig build -Dlib-only=true -Dtarget=aarch64-linux
- run: mv zig-out/lib/libfastfec.so libfastfec-linux-aarch64-${{ steps.get_version.outputs.VERSION }}.so
- run: zig build -Dwasm
- run: mv zig-out/lib/fastfec.wasm libfastfec-${{ steps.get_version.outputs.VERSION }}.wasm
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
fastfec-linux-x86_64-${{ steps.get_version.outputs.VERSION }}.zip
libfastfec-linux-x86_64-${{ steps.get_version.outputs.VERSION }}.so
libfastfec-linux-aarch64-${{ steps.get_version.outputs.VERSION }}.so
libfastfec-${{ steps.get_version.outputs.VERSION }}.wasm
build-macos:
if: github.event.base_ref == 'refs/heads/main'
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: goto-bus-stop/setup-zig@v1
with:
version: 0.9.0-dev.1675+3d528161c
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
shell: bash
- run: brew install pkg-config curl
- run: zig build
- run: zip -j fastfec-macos-x86_64-${{ steps.get_version.outputs.VERSION }}.zip zig-out/bin/fastfec
- run: mv zig-out/lib/libfastfec.dylib libfastfec-macos-x86_64-${{ steps.get_version.outputs.VERSION }}.dylib
- run: zig build -Dtarget=aarch64-macos
- run: zip -j fastfec-macos-aarch64-${{ steps.get_version.outputs.VERSION }}.zip zig-out/bin/fastfec
- run: mv zig-out/lib/libfastfec.dylib libfastfec-macos-aarch64-${{ steps.get_version.outputs.VERSION }}.dylib
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
fastfec-macos-x86_64-${{ steps.get_version.outputs.VERSION }}.zip
fastfec-macos-aarch64-${{ steps.get_version.outputs.VERSION }}.zip
libfastfec-macos-x86_64-${{ steps.get_version.outputs.VERSION }}.dylib
libfastfec-macos-aarch64-${{ steps.get_version.outputs.VERSION }}.dylib
build-windows:
if: github.event.base_ref == 'refs/heads/main'
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: ilammy/msvc-dev-cmd@v1
- uses: goto-bus-stop/setup-zig@v1
with:
version: 0.9.0-dev.1675+3d528161c
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
shell: bash
- run: c:; cd \vcpkg; git pull; .\bootstrap-vcpkg.bat
- run: vcpkg integrate install
- run: vcpkg install pcre curl --triplet x64-windows-static
- run: zig build --search-prefix C:/vcpkg/packages/pcre_x64-windows-static --search-prefix C:/vcpkg/packages/curl_x64-windows-static --search-prefix C:/vcpkg/packages/zlib_x64-windows-static -Dtarget=x86_64-windows-msvc
- run: Compress-Archive zig-out/bin/fastfec.exe fastfec-windows-x86_64-${{ steps.get_version.outputs.VERSION }}.zip
- run: mv zig-out/lib/fastfec.dll libfastfec-windows-x86_64-${{ steps.get_version.outputs.VERSION }}.dll
shell: bash
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
fastfec-windows-x86_64-${{ steps.get_version.outputs.VERSION }}.zip
libfastfec-windows-x86_64-${{ steps.get_version.outputs.VERSION }}.dll