Skip to content

Commit

Permalink
internal: update vcpkg & switch from nuget caching to gha cache (skyr…
Browse files Browse the repository at this point in the history
  • Loading branch information
Pospelove authored Mar 30, 2024
1 parent 2607687 commit d3456ef
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 27 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/pr-windows-ae.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite'
VCPKG_BINARY_SOURCES: 'clear;x-gha,readwrite'
VCPKG_FEATURE_FLAGS: 'manifests'

jobs:
Expand Down Expand Up @@ -41,16 +41,11 @@ jobs:
- name: Debug - free space
run: Get-PSDrive

- name: 'Setup NuGet Credentials'
shell: 'bash'
run: >
`C:/vcpkg/vcpkg.exe fetch nuget | tail -n 1`
sources add
-source "https://nuget.pkg.github.com/skyrim-multiplayer/index.json"
-storepasswordincleartext
-name "GitHub"
-username "skyrim-multiplayer"
-password "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/github-script@v6
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
# Download Skyrim SE data files
- uses: suisei-cn/actions-download-file@v1
Expand Down
17 changes: 6 additions & 11 deletions .github/workflows/pr-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite'
VCPKG_BINARY_SOURCES: 'clear;x-gha,readwrite'
VCPKG_FEATURE_FLAGS: 'manifests'

jobs:
Expand Down Expand Up @@ -39,16 +39,11 @@ jobs:
- name: Debug - free space
run: Get-PSDrive

- name: 'Setup NuGet Credentials'
shell: 'bash'
run: >
`C:/vcpkg/vcpkg.exe fetch nuget | tail -n 1`
sources add
-source "https://nuget.pkg.github.com/skyrim-multiplayer/index.json"
-storepasswordincleartext
-name "GitHub"
-username "skyrim-multiplayer"
-password "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/github-script@v6
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
# Download Skyrim SE data files
- uses: suisei-cn/actions-download-file@v1
Expand Down
8 changes: 4 additions & 4 deletions skyrim-platform/src/platform_lib/ThreadPoolWrapper.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include <BS_thread_pool_light.hpp>
#include <BS_thread_pool.hpp>
#include <cstdint>
#include <memory>
#include <mutex>
Expand All @@ -17,16 +17,16 @@ class ThreadPoolWrapper
{
std::lock_guard l(initMutex);
if (!pool) {
pool = std::make_unique<BS::thread_pool_light>(numThreads);
pool = std::make_unique<BS::thread_pool>(numThreads);
}
}
return pool->submit(task);
return pool->submit_task(task);
}

void PushAndWait(const std::function<void()>& task) { Push(task).wait(); }

private:
std::unique_ptr<BS::thread_pool_light> pool;
std::unique_ptr<BS::thread_pool> pool;
const int32_t numThreads;
std::mutex initMutex;
};
2 changes: 1 addition & 1 deletion vcpkg
Submodule vcpkg updated 4248 files

0 comments on commit d3456ef

Please sign in to comment.