Skip to content
This repository has been archived by the owner on Oct 3, 2022. It is now read-only.

Commit

Permalink
Setup Workflow for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
pegvin committed Jul 16, 2022
1 parent 0f6ba2c commit 282440e
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 30 deletions.
50 changes: 24 additions & 26 deletions .github/workflows/continuous.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,37 +17,35 @@ jobs:
update: true
install: mingw-w64-x86_64-gcc mingw-w64-x86_64-glfw mingw-w64-x86_64-libtre-git scons make git

- name: Build
- name: Build Goxel
run: |
make release
ls
# Build-For-Linux:
# runs-on: ubuntu-latest
# steps:
# - name: Check out
# uses: actions/checkout@v2

# - name: Install GLFW3, PKG Config, Git, Gtk3 & SCONS
# run: |
# sudo apt-get install libglfw3-dev pkg-config git libgtk-3-dev scons
Build-For-Linux:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v2

# - name: Build Goxel
# run: make release
- name: Install GLFW3, PKG Config, Git, Gtk3 & SCONS
run: |
sudo apt-get install libglfw3-dev pkg-config git libgtk-3-dev scons
# Build-For-OSX:
# runs-on: macos-11
# steps:
# - name: Check out
# uses: actions/checkout@v2
- name: Build Goxel
run: make release

# - name: Build Goxel
# run: cd osx/goxel && xcodebuild -configuration "Release" -destination 'platform=macOS' build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO && cd ../..
Build-For-OSX:
runs-on: macos-11
steps:
- name: Check out
uses: actions/checkout@v2

# Success:
# needs: [Build-For-Linux, Build-For-OSX, Build-For-Windows]
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v2
- name: Build Goxel
run: cd osx/goxel && xcodebuild -configuration "Release" -destination 'platform=macOS' build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO && cd ../..

Success:
needs: [Build-For-Linux, Build-For-OSX, Build-For-Windows]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
32 changes: 31 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,31 @@ on:
description: 'Version number Eg: 4.2.0'

jobs:
Build-For-Windows:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v2
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: mingw-w64-x86_64-gcc mingw-w64-x86_64-glfw mingw-w64-x86_64-libtre-git scons make git

- name: Build Goxel
run: |
make release
mv goxel2.exe goxel2-win32.exe
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: win_binary
path: goxel2-win32.exe
if-no-files-found: error

Build-For-Linux:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -65,6 +90,11 @@ jobs:
with:
name: linux_binary

- name: Download Linux build artifacts
uses: actions/download-artifact@v2
with:
name: win_binary

- name: Download OSX build artifacts
uses: actions/download-artifact@v2
with:
Expand All @@ -78,6 +108,6 @@ jobs:
prerelease: false
title: "Goxel v${{github.event.inputs.version}}"
files: |
goxel2-win32.exe
goxel2-linux.elf
goxel2-osx.zip
12 changes: 9 additions & 3 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,17 @@ if env['mode'] == 'debug' and target_os == 'posix':
# CFLAGS : only C
# CXXFLAGS : only C++
env.Append(
CFLAGS=['-std=gnu99'],#, '-Wall',
#'-Wno-unknow-pragma', '-Wno-unknown-warning-option'],
CXXFLAGS=['-std=gnu++17']#, '-Wall', '-Wno-narrowing']
CFLAGS=['-std=gnu99'],
CXXFLAGS=['-std=gnu++17']
)

# Add Some More Flags Only If The OS is not msys (it causes building issues)
if target_os != 'msys':
env.Append(
CFLAGS=['-Wall', '-Wno-unknow-pragma', '-Wno-unknown-warning-option'],
CXXFLAGS=['-Wall', '-Wno-narrowing']
)

if env['werror']:
env.Append(CCFLAGS='-Werror')

Expand Down

0 comments on commit 282440e

Please sign in to comment.