Skip to content

Windows

Windows #8

Workflow file for this run

# 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 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 build
- name: Zip artifacts
run: |
/c/msys64/usr/bin/zip -qqr build_folder.zip build
ls -la build_folder.zip
ls -lh build_folder.zip
- uses: actions/upload-artifact@v3
with:
name: build_folder
path: build_folder.zip
if-no-files-found: error
- name: Commit & push
if: github.actor == 'ser-mk'
run: |
git clone https://ser-mk:${{ secrets.TOKEN_PUSH }}@github.com/remotemcu/prebuilt_libraries.git
git config --global user.email "en.chormonov@gmail.com"
git config --global user.name "Evgeny Chormonov"
cp -rf build/output/* prebuilt_libraries/
cd prebuilt_libraries/
git add .
git status
git commit -m "update windows" || true
git push origin master