-
Notifications
You must be signed in to change notification settings - Fork 1
112 lines (108 loc) · 3.19 KB
/
cd.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
name: cd
on: [push]
jobs:
build-ubuntu:
strategy:
fail-fast: false
matrix:
lang:
- bash
- c
# - cpp # FIXME: `lang` needs to handle things differently maybe because it won't generate for this
- embedded-template
- html
- java
- javascript
- json
- python
- ruby
- rust
target:
# - { platform: linux-arm, triplet: arm-linux-gnueabi }
# - { platform: linux-arm64, triplet: aarch64-linux-gnu }
- { platform: linux-x64, triplet: x86_64-linux-gnu }
# NOTE:
# Now that we depend in tree-sitter-cli to regenerate the pulled parser
# all these platform doesn't make any sense. They're simply unsupported
# in the releases of tree-sitter.
# - arm-linux-gnueabihf
# - aarch64-linux-gnu
# - mipsel-linux-gnu
# - powerpc64le-linux-gnu
#
# FIXME: tree-sitter has a known (by me) bug by now:
# ld: unknown option -soname
# It should be patched to support
# - x86_64-apple-darwin
# - x86_64h-apple-darwin
# - i386-apple-darwin
#
# NOTE: Tese are supported by multiarch/crossbuild but not tree-sitter
# - x86_64-w64-mingw32
# - i686-w64-mingw32
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build ${{ matrix.lang }} for ${{ matrix.target.platform }}
env:
PLATFORM: ${{ matrix.target.platform }}
run: |
./lang d ${{ matrix.lang }}
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.vars.outputs.sha_short }}
name: Release ${{ github.ref }}-${{ steps.vars.outputs.sha_short }}
draft: true
files: |
./lib/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-macos:
strategy:
fail-fast: false
matrix:
lang:
- bash
- c
# - cpp
- embedded-template
- html
- java
- javascript
- json
- python
- ruby
- rust
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Build ${{ matrix.lang }} for macos
env:
PLATFORM: "macos-arm64"
run: |
./lang d ${{ matrix.lang }}
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.vars.outputs.sha_short }}
name: Release ${{ github.ref }}-${{ steps.vars.outputs.sha_short }}
draft: true
files: |
./lib/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release-fixed-assets:
needs: [build-ubuntu, build-macos]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.vars.outputs.sha_short }}
name: Release ${{ github.ref }}-${{ steps.vars.outputs.sha_short }}
draft: true
files: ref
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}