-
Notifications
You must be signed in to change notification settings - Fork 20
146 lines (119 loc) · 3.83 KB
/
Copy pathk.yml
File metadata and controls
146 lines (119 loc) · 3.83 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
name: ktye/k
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: set date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: checkout ktye/i
uses: actions/checkout@v2
with:
path: i
- name: checkout wg
uses: actions/checkout@v2
with:
repository: ktye/wg
path: wg
- name: setup go
uses: actions/setup-go@v2
with:
go-version: '1.17'
- name: install wg
run: cd wg && go install ./cmd/wg
- name: install wabt
run: |
wget https://github.com/WebAssembly/wabt/releases/download/1.0.26/wabt-1.0.26-ubuntu.tar.gz
tar zxf wabt-1.0.26-ubuntu.tar.gz
cp wabt-1.0.26/bin/wat2wasm .
- name: build k
run: cd i && go build -v
- name: test and install k
run: cd i && go test && go install
- name: build k.wasm
run: |
cd i
wg . > k.wat
../wat2wasm -o k.wasm k.wat
- name: k.f
run: cd i/f77 && sh mk && sh mk test
- name: k.go
run: cd i/x && wg -k .. > k.k && k k.k go.k -e 'x:`<go`pkg`k' > k.go && go fmt k.go && go build -o kg k.go && ./kg ../k.t -e
- name: kx.go
run: cd i/kx && sh mk
- name: kcsv.go
run: cd i/kcsv && sh mk test
- name: k.c
run: cd i/x && k k.k cc.k -e 'x:`<cc``' > k.c && gcc -o kc k.c -lm && ./kc ../k.t -e
- name: kv.c
run: cd i && wg -tags simd5 -c . > kv.c && clang -O3 -Wall -mavx2 -Wfatal-errors kv.c -okv -lm && ./kv k.t -e
- name: l8.c
run: |
cd i/x && k k.k cc.k -e 'x:`<cc``l8' > l8.c
gcc -Os -s -nostdlib -static -Wl,--nmagic -Wl,--build-id=none -fno-asynchronous-unwind-tables -ol8_ l8.c
objcopy --remove-section .comment l8_ l8
./l8 ../k.t -e
- name: delete release
uses: dev-drprasad/delete-older-releases@v0.2.0
with:
keep_latest: 0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: latest
release_name: Release ${{ steps.date.outputs.date }} ${{ github.ref }}
- name: upload k.go
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./i/x/k.go
asset_name: k.go
asset_content_type: text/plain
- name: upload k.f
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./i/f77/k.f
asset_name: k.f
asset_content_type: text/plain
- name: upload k.c
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./i/x/k.c
asset_name: k.c
asset_content_type: text/plain
- name: upload kv.c
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./i/kv.c
asset_name: kv.c
asset_content_type: text/plain
- name: upload l8.c
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./i/x/l8.c
asset_name: l8.c
asset_content_type: text/plain