forked from clshortfuse/renodx
-
Notifications
You must be signed in to change notification settings - Fork 3
141 lines (109 loc) · 3.89 KB
/
snapshot.yml
File metadata and controls
141 lines (109 loc) · 3.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
name: snapshot
on:
workflow_dispatch:
push:
branches: [main]
paths-ignore:
- "**/*.md"
- "docs/**"
- ".github/workflows/**"
permissions:
packages: write
contents: write
jobs:
build:
runs-on: windows-latest
env:
SCCACHE_GHA_ENABLED: "true"
SCCACHE_CACHE_SIZE: "5G"
SCCACHE_C_CUSTOM_CACHE_BUSTER: "${{ github.workflow }}"
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up sccache
uses: mozilla-actions/sccache-action@v0.0.9
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
- name: Download Slang binaries
run: |
curl -L -o slang.zip https://github.com/shader-slang/slang/releases/download/v2025.10.3/slang-2025.10.3-windows-x86_64.zip
powershell -Command "Expand-Archive -Path slang.zip -DestinationPath slang_temp -Force; if (!(Test-Path -Path .\bin)) { New-Item -ItemType Directory -Path .\bin }; Copy-Item slang_temp\bin\* .\bin -Force; Remove-Item slang_temp -Recurse -Force"
- name: Set up Clang
uses: egor-tensin/setup-clang@v1
with:
version: latest
platform: x64
- name: Install ninja-build tool
uses: seanmiddleditch/gha-setup-ninja@v5
- name: Configure build for amd64
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64
- name: Configure CMake (x64)
run: cmake --preset clang-x64 -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
- name: Build (x64)
run: cmake --build --preset clang-x64-release --verbose
- name: Set up Clang
uses: egor-tensin/setup-clang@v1
with:
version: latest
platform: x86
- name: Configure build for x86
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64_x86
- name: Configure CMake (x86)
run: cmake --preset clang-x86 -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
- name: Build (x86)
run: cmake --build --preset clang-x86-release --verbose
- name: Show sccache stats
if: always()
run: sccache --show-stats
- name: Prepare Release folder
run: md githubrelease
- name: Copy Schema
run: copy renodx-metadata-schema.json githubrelease\
- name: Copy Binaries (x64)
run: copy build\release\*.addon64 githubrelease\
- name: Copy Binaries (x86)
run: copy build32\release\*.addon32 githubrelease\
- name: Copy Binaries (Tools)
run: copy build\release\*.exe githubrelease\
- name: Copy Binaries (PDBs)
run: copy build\release\*.pdb githubrelease\
- name: Generate metadata manifest
run: node scripts/generate-release-manifest.mjs
- name: Put current date into a variable
run: |
$NOW=& Get-Date -format yyyyMMdd
echo "NOW=$NOW" >> $env:GITHUB_ENV
- name: Create a Release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: snapshot
title: RenoDX Snapshot Build
files: githubrelease/*
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: "githubrelease"
deploy:
if: github.ref == 'refs/heads/main'
needs: build
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Specify runner + deployment step
runs-on: windows-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4