Skip to content

Commit

Permalink
IMPR: add windows build for github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ser-mk committed Aug 9, 2023
1 parent a8cb110 commit bcee9af
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# This is a basic workflow to help you get started with Actions

name: Windows

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "master" branch
pull_request:
branches: [ "master" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: windows-2019

defaults:
run:
shell: bash

env:
LLVM_ADIN_PATH: "C:/Program Files/LLVM/bin/"
PRETTY_OUTPUT_DIR: 1

steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: prepare
# Build your program with the given configuration
run: |
"C:\Program Files (x86)\Microsoft Visual Studio\Installer\InstallCleanup.exe" #-full #-f
"C:\msys64\usr\bin\pacman" -Rs --noconfirm mingw-w64-i686-clang
"C:\msys64\usr\bin\pacman" -Rs --noconfirm mingw-w64-x86_64-clang-tools-extra
"C:\msys64\usr\bin\pacman" -Rs --noconfirm mingw-w64-x86_64-clang
"C:\msys64\usr\bin\pacman" -Rs --noconfirm mingw-w64-x86_64-llvm
"C:\msys64\usr\bin\pacman" -Rs --noconfirm mingw-w64-i686-llvm
# choco uninstall llvm
# choco uninstall cmake.install
"C:\msys64\usr\bin\pacman" -S --noconfirm cmake
rm -rf "C:\Program Files\LLVM"
git clone https://github.com/remotemcu/llvm80-windows_x64.git "C:\Program Files\LLVM"
"C:\Program Files\LLVM\vs_BuildTools.exe" --quiet --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.VC.Tools.14.13 --nocache --wait
- name: check version
run: |
clang --version
cmake --version
- name: Configure CMake
run: |
cmake -B "D:\build" -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=REMCU/platform/windows_x64_clang.cmake
- name: Build
# Build your program with the given configuration
run: |
cmake --build "D:\build"

0 comments on commit bcee9af

Please sign in to comment.