-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (72 loc) · 2.71 KB
/
build.yaml
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
name: Compile pycdc for Windows & Linux
on: workflow_dispatch
jobs:
build-job:
runs-on: ubuntu-22.04
steps:
- name: Install mingw-w64
run: |
sudo apt update
sudo apt install -y mingw-w64
- name: Clone pycdc
run: git clone --depth=1 https://github.com/zrax/pycdc
- name: Compile
run: >
cd pycdc
echo "RELEASE_COMMIT=$(git log -1 --format=%h)" >> ${GITHUB_ENV}
cmake -DCMAKE_SYSTEM_NAME=Windows
-DCMAKE_C_COMPILER=i686-w64-mingw32-gcc
-DCMAKE_CXX_COMPILER=i686-w64-mingw32-g++
-DCMAKE_FIND_ROOT_PATH=/usr/i686-w64-mingw32
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY
-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY
-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER
-DCMAKE_CXX_STANDARD_LIBRARIES="-static-libgcc -static-libstdc++"
.
make
- name: Set release date & time
run: |
echo "RELEASE_DATE=$(date -u +%d-%b-%Y)" >> ${GITHUB_ENV}
echo "RELEASE_TIME=$(date -u +%H:%M)" >> ${GITHUB_ENV}
# - name: Upload artifact
# uses: actions/upload-artifact@v3
# with:
# name: pycdc
# path: |
# pycdc/pycdc.exe
# pycdc/pycdas.exe
- name: Create release Windows
uses: ncipollo/release-action@v1
with:
name: Decompyle++ ${{ env.RELEASE_DATE }}
tag: build-${{ env.RELEASE_DATE }}-${{ env.RELEASE_COMMIT }}
body: Compiled on ${{ env.RELEASE_DATE }} at ${{ env.RELEASE_TIME }} GMT, pycdc commit ${{ env.RELEASE_COMMIT }}
artifacts: "pycdc/pycdc.exe,pycdc/pycdas.exe"
token: ${{ secrets.TOKEN }}
allowUpdates: true
draft: true
- name: Setup latest Alpine Linux
uses: jirutka/setup-alpine@v1
with:
packages: >
alpine-sdk
cmake
python3
- name: Compile for Linux
run: |
cd pycdc
git clean -d -f -x
sed -i '/target_link_libraries(pycdc pycxx)/c target_link_libraries(pycdc pycxx -static)' CMakeLists.txt
cmake .
make
shell: alpine.sh {0}
- name: Create release Linux
uses: ncipollo/release-action@v1
with:
name: Decompyle++ ${{ env.RELEASE_DATE }}
tag: build-${{ env.RELEASE_DATE }}-${{ env.RELEASE_COMMIT }}
body: Compiled on ${{ env.RELEASE_DATE }} at ${{ env.RELEASE_TIME }} GMT, pycdc commit ${{ env.RELEASE_COMMIT }}
artifacts: "pycdc/pycdc,pycdc/pycdas"
token: ${{ secrets.TOKEN }}
allowUpdates: true
draft: true