Skip to content

Commit f474d1c

Browse files
authored
Create main.yml
1 parent 3bffb87 commit f474d1c

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/main.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: xmake-build
2+
3+
on:
4+
push:
5+
branches: ["**"]
6+
pull_request:
7+
branches: ["**"]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
runs-on: windows-latest
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
build_type: [release, debug]
17+
defaults:
18+
run:
19+
shell: pwsh
20+
21+
steps:
22+
- name: Checkout project
23+
uses: actions/checkout@v4
24+
25+
- name: Clone System Informer SDK
26+
run: |
27+
git clone --depth=1 https://github.com/winsiderss/systeminformer.git systeminformer
28+
29+
- name: Patch xmake.lua include/link paths
30+
run: |
31+
(Get-Content xmake.lua) -replace 'S:/gits/systeminformer', '${{ github.workspace }}/systeminformer' |
32+
Set-Content xmake.lua
33+
34+
- name: Setup xmake with caches
35+
uses: xmake-io/github-action-setup-xmake@v1
36+
with:
37+
xmake-version: latest
38+
actions-cache-folder: .xmake-cache
39+
actions-cache-key: ${{ runner.os }}-xmake-core
40+
package-cache: true
41+
package-cache-key: ${{ runner.os }}-xmake-pkgs-${{ hashFiles('xmake.lua', '**/*.lua', 'xmake-requires.txt', 'xmake-lock.json') }}
42+
project-path: .
43+
build-cache: true
44+
build-cache-key: ${{ runner.os }}-xmake-bld-${{ matrix.build_type }}
45+
46+
- name: Build
47+
run: xmake -b
48+
49+
- name: Upload artifacts
50+
uses: actions/upload-artifact@v4
51+
with:
52+
name: DllInject-${{ matrix.build_type }}-x64
53+
path: |
54+
build/**
55+
if-no-files-found: error

0 commit comments

Comments
 (0)