This repository has been archived by the owner on Feb 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
123 lines (119 loc) · 3.96 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
name: Release
on:
push:
tags:
- '*.*.*'
jobs:
make-source:
name: Make source tarball
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: Create a version file.
run: |
export MRZIP_MAJOR=`git describe --tags --abbrev=0 | sed 's/v//' | cut -d. -f1`
export MRZIP_MINOR=`git describe --tags --abbrev=0 | sed 's/v//' | cut -d. -f2`
export MRZIP_PATCH=`git describe --tags --abbrev=0 | sed 's/v//' | cut -d. -f3`
export FULLVER=`git describe --tags --abbrev=0 | sed 's/v//'`
echo -ne "$FULLVER\n$MRZIP_MAJOR\n$MRZIP_MINOR\n$MRZIP_PATCH\n" > .version
tar -czf /tmp/mrzip-src.tar.gz --exclude-vcs .
- name: Upload source tarball
uses: softprops/action-gh-release@v1
with:
files: /tmp/mrzip-src.tar.gz
build-clang:
name: Ubuntu Clang
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: Install dependencies
run: |
sudo apt update -q -y
sudo apt install -q -y clang make libgcrypt-dev libgpg-error-dev
- name: Configure
run: |
./configure CC=clang CXX=clang++ --enable-lto --enable-static
- name: Make
run: |
git config --global --add safe.directory '*'
make -j$(nproc)
cp mrzip mrzip-x86_64-linux
cp rs-mrzip/rs-mrzip rs-mrzip-x86_64-linux
cp ar-mrzip/ar-mrzip ar-mrzip-x86_64-linux
zip mrzip-x86_64-linux.zip mrzip-x86_64-linux rs-mrzip-x86_64-linux ar-mrzip-x86_64-linux
- name: Publish Release
uses: softprops/action-gh-release@v1
with:
files: mrzip-x86_64-linux.zip
build-windows-msys2:
name: Windows msys2 GCC
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- uses: msys2/setup-msys2@v2
with:
install: git gcc make zip libgcrypt-devel libgpg-error-devel msys2-runtime-devel
- name: Configure
run: |
./configure CC=gcc CXX=g++ --enable-lto --enable-static
- name: Make
run: |
git config --global --add safe.directory '*'
make -j$(nproc)
cp mrzip.exe mrzip-x86_64.exe
cp /usr/bin/msys-2.0.dll .
cp rs-mrzip/rs-mrzip.exe rs-mrzip-x86_64.exe
cp ar-mrzip/ar-mrzip.exe ar-mrzip-x86_64.exe
zip -q mrzip-x86_64-windows.zip mrzip-x86_64.exe ar-mrzip-x86_64.exe rs-mrzip-x86_64.exe msys-2.0.dll
- name: Publish Release
uses: softprops/action-gh-release@v1
with:
files: mrzip-x86_64-windows.zip
build-archs:
name: aarch64, s390x, ppc64le Debian Clang
strategy:
fail-fast: false
matrix:
arch: [ aarch64, s390x, ppc64le ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- uses: uraimo/run-on-arch-action@v2
name: Run in the container
with:
arch: ${{ matrix.arch }}
distro: bullseye
shell: /bin/sh
dockerRunArgs: |
--volume "${PWD}:/modern-rzip"
install: |
apt update -q -y
apt install -q -y zip git clang make libgcrypt-dev libgpg-error-dev
run: |
git config --global --add safe.directory '*'
cd /modern-rzip
./configure CC=clang CXX=clang++ --enable-static
make
cp mrzip mrzip-${{ matrix.arch }}-linux
cp rs-mrzip/rs-mrzip rs-mrzip-${{ matrix.arch }}-linux
cp ar-mrzip/ar-mrzip ar-mrzip-${{ matrix.arch }}-linux
zip mrzip-${{ matrix.arch }}-linux.zip mrzip-${{ matrix.arch }}-linux rs-mrzip-${{ matrix.arch }}-linux ar-mrzip-${{ matrix.arch }}-linux
- name: Publish Release
uses: softprops/action-gh-release@v1
with:
files: mrzip-${{ matrix.arch }}-linux.zip