This repository has been archived by the owner on Oct 15, 2022. It is now read-only.
forked from alec-liu/frugalify
-
Notifications
You must be signed in to change notification settings - Fork 0
143 lines (141 loc) · 9.37 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
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
on:
push:
branches:
- master
workflow_dispatch:
branches:
- master
name: Release
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: recursive
- name: Install Toolchains
run: |
curl -L https://github.com/dimkr/toolchains/releases/latest/download/x86_64-any64-linux-musl.tar.gz | sudo tar -xzf - -C /
curl -L https://github.com/dimkr/toolchains/releases/latest/download/arm-any32-linux-musleabi.tar.gz | sudo tar -xzf - -C /
curl -L https://github.com/dimkr/toolchains/releases/latest/download/i386-any32-linux-musl.tar.gz | sudo tar -xzf - -C /
mkdir -p linux
curl -o linux/fscrypt.h "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/plain/include/uapi/linux/fscrypt.h?h=linux-5.4.y&id=8f55ad4daf001b6ee8ddf672e14475a35403b258"
- name: x86_64 Build
run: |
. /opt/x-tools/x86_64-any64-linux-musl/activate
x86_64-any64-linux-musl-cc $CFLAGS -D_GNU_SOURCE -DHAVE_STRLCPY -DHAVE_AUFS frugalify.c $LDFLAGS -o frugalify-aufs-x86_64
x86_64-any64-linux-musl-strip -s -R .note -R .comment frugalify-aufs-x86_64
x86_64-any64-linux-musl-cc $CFLAGS -D_GNU_SOURCE -DHAVE_STRLCPY -DHAVE_AUFS -DHAVE_FSCRYPT -I. -Imbedtls/include -DMBEDTLS_SHA512_C -DMBEDTLS_CONFIG_FILE=\"/dev/null\" frugalify.c mbedtls/library/sha512.c $LDFLAGS -o frugalify-aufs-fscrypt-x86_64
x86_64-any64-linux-musl-strip -s -R .note -R .comment frugalify-aufs-fscrypt-x86_64
x86_64-any64-linux-musl-cc $CFLAGS -D_GNU_SOURCE -DHAVE_STRLCPY frugalify.c $LDFLAGS -o frugalify-overlayfs-x86_64
x86_64-any64-linux-musl-strip -s -R .note -R .comment frugalify-overlayfs-x86_64
- name: ARM Build
run: |
. /opt/x-tools/arm-any32-linux-musleabi/activate
arm-any32-linux-musleabi-cc $CFLAGS -D_GNU_SOURCE -DHAVE_STRLCPY -DHAVE_AUFS frugalify.c $LDFLAGS -o frugalify-aufs-arm
arm-any32-linux-musleabi-strip -s -R .note -R .comment frugalify-aufs-arm
arm-any32-linux-musleabi-cc $CFLAGS -D_GNU_SOURCE -DHAVE_STRLCPY -DHAVE_AUFS -DHAVE_FSCRYPT -I. -Imbedtls/include -DMBEDTLS_SHA512_C -DMBEDTLS_CONFIG_FILE=\"/dev/null\" frugalify.c mbedtls/library/sha512.c $LDFLAGS -o frugalify-aufs-fscrypt-arm
arm-any32-linux-musleabi-strip -s -R .note -R .comment frugalify-aufs-fscrypt-arm
arm-any32-linux-musleabi-cc $CFLAGS -D_GNU_SOURCE -DHAVE_STRLCPY frugalify.c $LDFLAGS -o frugalify-overlayfs-arm
arm-any32-linux-musleabi-strip -s -R .note -R .comment frugalify-overlayfs-arm
- name: x86 Build
run: |
. /opt/x-tools/i386-any32-linux-musl/activate
i386-any32-linux-musl-cc $CFLAGS -D_GNU_SOURCE -DHAVE_STRLCPY -DHAVE_AUFS frugalify.c $LDFLAGS -o frugalify-aufs-i386
i386-any32-linux-musl-strip -s -R .note -R .comment frugalify-aufs-i386
i386-any32-linux-musl-cc $CFLAGS -D_GNU_SOURCE -DHAVE_STRLCPY -DHAVE_AUFS -DHAVE_FSCRYPT -I. -Imbedtls/include -DMBEDTLS_SHA512_C -DMBEDTLS_CONFIG_FILE=\"/dev/null\" frugalify.c mbedtls/library/sha512.c $LDFLAGS -o frugalify-aufs-fscrypt-i386
i386-any32-linux-musl-strip -s -R .note -R .comment frugalify-aufs-fscrypt-i386
i386-any32-linux-musl-cc $CFLAGS -D_GNU_SOURCE -DHAVE_STRLCPY frugalify.c $LDFLAGS -o frugalify-overlayfs-i386
i386-any32-linux-musl-strip -s -R .note -R .comment frugalify-overlayfs-i386
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: v${{ github.run_number }}
release_name: v${{ github.run_number }}
draft: false
prerelease: false
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./frugalify-aufs-x86_64
asset_name: frugalify-aufs-x86_64
asset_content_type: application/x-executable
- name: Upload Release Asset 2
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./frugalify-aufs-fscrypt-x86_64
asset_name: frugalify-aufs-fscrypt-x86_64
asset_content_type: application/x-executable
- name: Upload Release Asset 3
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./frugalify-overlayfs-x86_64
asset_name: frugalify-overlayfs-x86_64
asset_content_type: application/x-executable
- name: Upload Release Asset 4
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./frugalify-aufs-arm
asset_name: frugalify-aufs-arm
asset_content_type: application/x-executable
- name: Upload Release Asset 5
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./frugalify-aufs-fscrypt-arm
asset_name: frugalify-aufs-fscrypt-arm
asset_content_type: application/x-executable
- name: Upload Release Asset 6
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./frugalify-overlayfs-arm
asset_name: frugalify-overlayfs-arm
asset_content_type: application/x-executable
- name: Upload Release Asset 7
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./frugalify-aufs-i386
asset_name: frugalify-aufs-i386
asset_content_type: application/x-executable
- name: Upload Release Asset 8
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./frugalify-aufs-fscrypt-i386
asset_name: frugalify-aufs-fscrypt-i386
asset_content_type: application/x-executable
- name: Upload Release Asset 9
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./frugalify-overlayfs-i386
asset_name: frugalify-overlayfs-i386
asset_content_type: application/x-executable