-
Notifications
You must be signed in to change notification settings - Fork 52
110 lines (94 loc) · 3.8 KB
/
cmake-windows.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
name: Build FreeDV (Windows)
on:
push:
branches-ignore:
- 'dr-render-manual'
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Debug
jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install WINE
run: |
sudo dpkg --add-architecture i386
sudo sh -c "curl https://dl.winehq.org/wine-builds/winehq.key | gpg --dearmor > /etc/apt/trusted.gpg.d/winehq.gpg"
sudo sh -c "apt-add-repository \"https://dl.winehq.org/wine-builds/ubuntu\""
sudo apt-get update
echo "/opt/wine-staging/bin" >> $GITHUB_PATH
sudo apt install -y --install-recommends wine-staging
#sudo apt install -y --install-recommends wine64 wine32
- name: Install required packages
shell: bash
working-directory: ${{github.workspace}}
run: sudo apt-get install nsis
- name: Configure WINE
shell: bash
working-directory: ${{github.workspace}}
run: |
WINEPREFIX=`pwd`/wine-env WINEARCH=win64 DISPLAY= winecfg /v win10
- name: Create Windows Python environment for build
shell: bash
working-directory: ${{github.workspace}}
run: |
export WINEPREFIX=`pwd`/wine-env
wget https://www.python.org/ftp/python/3.12.7/python-3.12.7-amd64.exe
Xvfb :99 -screen 0 1024x768x16 &
export DISPLAY=:99.0
wine ./python-3.12.7-amd64.exe /quiet /log c:\\python.log InstallAllUsers=1 Include_doc=0 Include_tcltk=0 || :
cat $WINEPREFIX/drive_c/python.log
wine c:\\Program\ Files\\Python312\\Scripts\\pip.exe install numpy
- name: Download MinGW LLVM
shell: bash
working-directory: ${{github.workspace}}
run: |
wget https://github.com/mstorsjo/llvm-mingw/releases/download/20230320/llvm-mingw-20230320-ucrt-ubuntu-18.04-x86_64.tar.xz
tar xvf llvm-mingw-20230320-ucrt-ubuntu-18.04-x86_64.tar.xz
- name: Configure freedv-gui
shell: bash
working-directory: ${{github.workspace}}
run: |
export WINEPREFIX=`pwd`/wine-env
export PATH=${{github.workspace}}/llvm-mingw-20230320-ucrt-ubuntu-18.04-x86_64/bin:$PATH
mkdir build_windows
cd build_windows
cmake -DLPCNET_DISABLE=1 -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/cross-compile/freedv-mingw-llvm-x86_64.cmake -DPython3_ROOT_DIR=$WINEPREFIX/drive_c/Program\ Files/Python312 ..
- name: Build freedv-gui
shell: bash
working-directory: ${{github.workspace}}/build_windows
run: |
export PATH=${{github.workspace}}/llvm-mingw-20230320-ucrt-ubuntu-18.04-x86_64/bin:$PATH
make -j6 package
- name: Rename installer
shell: bash
working-directory: ${{github.workspace}}/build_windows
run: |
mv FreeDV*.exe FreeDV.exe
- name: Stash for next step
uses: actions/upload-artifact@v4
with:
name: FreeDVSetupProgram
path: ${{github.workspace}}/build_windows/FreeDV.exe
test:
runs-on: windows-latest
needs: build
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v4
with:
name: FreeDVSetupProgram
path: ${{github.workspace}}
- name: Install FreeDV on hard drive
shell: pwsh
run: |
.\FreeDV.exe /S /D=${{github.workspace}}\FreeDV-Install-Location
- name: List FreeDV folder
shell: pwsh
run: |
dir ${{github.workspace}}\FreeDV-Install-Location