-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create 2 instances to build ubuntu and windows in separate worflows
- Loading branch information
Showing
2 changed files
with
111 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
name: Build-windows | ||
|
||
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
- cron: '0 0 * * 5' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
||
Tarball: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Make Source Tarball | ||
run: | | ||
cd .. | ||
tar -cf source.tar scopehal-apps | ||
gzip -S .gz -9 source.tar | ||
mv source.tar.gz scopehal-apps/ | ||
- name: Upload Source | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: glscopeclient-source | ||
path: source.tar.gz | ||
|
||
Windows: | ||
runs-on: windows-latest | ||
|
||
defaults: | ||
run: | ||
shell: msys2 {0} | ||
|
||
steps: | ||
|
||
- run: git config --global core.autocrlf input | ||
shell: bash | ||
|
||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
fetch-depth: 0 | ||
|
||
- uses: msys2/setup-msys2@v2 | ||
with: | ||
update: true | ||
msystem: MINGW64 | ||
install: | | ||
git | ||
wget | ||
mingw-w64-x86_64-toolchain | ||
- name: Install Vulkan SDK | ||
run: | | ||
wget https://sdk.lunarg.com/sdk/download/1.3.224.1/windows/VulkanSDK-1.3.224.1-Installer.exe | ||
./VulkanSDK-1.3.224.1-Installer.exe --accept-licenses --default-answer --confirm-command install | ||
echo "/c/VulkanSDK/1.3.224.1/Bin" >> $GITHUB_PATH | ||
- name: Setup Paths and Env for all steps | ||
run: | | ||
rm -f ~/.bash_profile | ||
echo "PATH=/c/VulkanSDK/1.3.224.1/Bin:\$PATH" >> ~/.bash_profile | ||
echo "export VK_SDK_PATH=/c/VulkanSDK/1.3.224.1" >> ~/.bash_profile | ||
echo "export VULKAN_SDK=/c/VulkanSDK/1.3.224.1" >> ~/.bash_profile | ||
- name: Build | ||
run: | | ||
cd msys2 | ||
MINGW_ARCH=mingw64 makepkg-mingw --noconfirm --noprogressbar -sCLf | ||
- name: Test | ||
run: | | ||
pacman -U --noconfirm msys2/*.zst | ||
glscopeclient --help | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: glscopeclient-windows | ||
path: msys2/*.zst | ||
|
||
- name: Build MSI / portable zip | ||
run: | | ||
mkdir build_msi | ||
cd build_msi | ||
cmake \ | ||
-G"Ninja" \ | ||
-DBUILD_TESTING=OFF \ | ||
-DWIXPATH="/c/Program Files (x86)/WiX Toolset v3.11/bin" \ | ||
../ | ||
cmake --build ./ | ||
- name: Upload Artifacts (portable zip) | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: glscopeclient-windows-portable | ||
path: build_msi/dist/windows_x64 | ||
|
||
- name: Upload Artifacts (MSI) | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: glscopeclient-windows.msi | ||
path: build_msi/dist/*.msi |