Skip to content

Set extended style instead of basic style #528

Set extended style instead of basic style

Set extended style instead of basic style #528

Workflow file for this run

name: Build C++ utility
on: [push]
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Restore MSYS2 package cache
uses: actions/cache@v3
with:
path: |
C:\msys64\var\cache\pacman\pkg
C:\msys64\var\lib\pacman\sync
key: msys2-pkgs-${{ runner.os }}-${{ hashFiles('dlls/api.dll') }}
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
update: true
install: |
mingw-w64-x86_64-gcc
- name: Compile to .dll
shell: msys2 {0}
run: |
g++ -O2 -Wextra -shared -std=c++20 -Wmissing-field-initializers -static -o src/dlls/api.dll src/api.cpp src/settings.cpp src/asteroids.cpp -lgdi32 -lwininet
g++ -O2 -Wextra -Wcast-function-type -Wmissing-field-initializers -shared -std=c++20 -static -o src/dlls/gui.dll src/gui.cpp src/settings.cpp src/asteroids.cpp src/system.cpp src/api.cpp -lgdi32 -lwininet -lcomctl32
ls -l src/dlls/api.dll
ls -l src/dlls/gui.dll
- name: Commit and push .dll file
run: |
git config --global user.name "Ethan Chan"
git config --global user.email "[email protected]"
git add . -f
git commit -m "Auto-build DLL files using g++" || echo "No changes to commit"
git push https://[email protected]/eschan145/DieKnow.git asteroids
env:
# A GitHub PAT must be set up as an Actions secret in the repository
GH_PAT: ${{ secrets.GH_PAT }}
- name: Save MSYS2 package cache
uses: actions/cache@v3
with:
path: |
C:\msys64\var\cache\pacman\pkg
C:\msys64\var\lib\pacman\sync
key: msys2-pkgs-${{ runner.os }}-${{ hashFiles('src/api.cpp') }}
restore-keys: |
msys2-pkgs-${{ runner.os }}-