Skip to content

Added a windows compilation action. #14

Added a windows compilation action.

Added a windows compilation action. #14

Workflow file for this run

name: Windows
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Premake
if: steps.cache-premake.outputs.cache-hit != 'true'
run: |
Invoke-WebRequest -Uri "https://github.com/premake/premake-core/releases/download/v5.0.0-alpha16/premake-5.0.0-alpha16-windows.zip" -OutFile "premake.zip"
Expand-Archive "premake.zip" -DestinationPath "C:\tools"
echo "C:\tools" | Out-File -Append -FilePath $env:GITHUB_PATH
- name: Install Clang
run: |
choco install llvm --version=11.0.0
- name: Set CC and CXX environment variables
run: |
echo "CC=clang" | Out-File -Append -FilePath $env:GITHUB_ENV
echo "CXX=clang++" | Out-File -Append -FilePath $env:GITHUB_ENV
- name: Cache Compilation Outputs
uses: actions/cache@v2
with:
path: |
output/**/bin/
output/**/obj/
key: ${{ runner.os }}-compilation-${{ hashFiles('**/*.cpp', '**/*.h') }}
restore-keys: |
${{ runner.os }}-compilation-
- name: Run Premake
run: .\premake5.exe gmake
- name: Compile Project
run: mingw32-make config=debug CC=clang