Skip to content

Commit

Permalink
Merge pull request #18 from trackpadpro/dev
Browse files Browse the repository at this point in the history
the error that remains appears to be a choice of shell/go functions

moby/moby#15272
moby/moby#17738
golang/go#11914
  • Loading branch information
trackpadpro committed Apr 11, 2022
2 parents 19c294f + 13f386d commit f5f3e75
Show file tree
Hide file tree
Showing 12 changed files with 123 additions and 42 deletions.
2 changes: 1 addition & 1 deletion .github/README.md
Expand Up @@ -33,7 +33,7 @@ cd .\tppsss\
### Run Commands

```
.\tripleS.exe
.\tppsss.exe
break #end the program
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/cmakeMSYS2.yml
Expand Up @@ -23,9 +23,7 @@ jobs:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/checkout@v3
- uses: msys2/setup-msys2@v2
with:
msystem: ${{matrix.sys}}
Expand All @@ -43,6 +41,4 @@ jobs:
cmake -G "${{matrix.BUILD_TOOL}}" -S . -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
cmake --build build --config ${{env.BUILD_TYPE}}
- name: Test
run: |
ctest -C ${{env.BUILD_TYPE}}
run: ctest -C ${{env.BUILD_TYPE}}
11 changes: 4 additions & 7 deletions .github/workflows/cmakeNative.yml
Expand Up @@ -19,23 +19,20 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest]
name: ${{matrix.os}}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install Deps Linux
if: runner.os == 'Linux'
run: |
sudo apt install libcurl4-openssl-dev
run: sudo apt install libcurl4-openssl-dev
- name: Install Deps Windows
if: runner.os == 'Windows'
run: |
vcpkg install curl:x64-windows
run: vcpkg install curl:x64-windows
- name: Configure
if: runner.os != 'Windows'
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Configure Windows
if: runner.os == 'Windows'
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE="${env:VCPKG_INSTALLATION_ROOT}\\scripts\\buildsystems\\vcpkg.cmake"
- name: Build
run: cmake --build build --config ${{env.BUILD_TYPE}}
- name: Test
run: ctest -C ${{env.BUILD_TYPE}}

28 changes: 28 additions & 0 deletions .github/workflows/runExample.yml
@@ -0,0 +1,28 @@
name: Functional Example

on:
pull_request:
branches:
- master
schedule:
- cron: '0 5 * * 5'

jobs:
build:
runs-on: windows-latest
strategy:
fail-fast: false
name: Build with Initial Boot
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '>=1.16.15'
- name: Install libcurl
run: vcpkg install curl:x64-windows
- name: Configure and Build
run: |
cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE="${env:VCPKG_INSTALLATION_ROOT}\\scripts\\buildsystems\\vcpkg.cmake"
.\\bootstrap.bat -deps on
- name: Initial Boot Example
run: powershell -ExecutionPolicy ByPass -File .\\scripts\\exampleExpectLua.ps1 -STEAM_LOGIN_COOKIE ${{secrets.STEAM_LOGIN_COOKIE}}
14 changes: 7 additions & 7 deletions .gitignore
Expand Up @@ -30,6 +30,13 @@
*.out
*.app

# VSCode
.vscode/
.vs/

# clangd
.cache/

# CMake
CMakeCache.txt
CMakeFiles
Expand All @@ -39,12 +46,5 @@ install_manifest.txt
Testing/
build/

# VSCode
.vscode/
.vs/

# clangd
.cache/

# Security
data/auth/
4 changes: 4 additions & 0 deletions .gitmodules
@@ -1 +1,5 @@

[submodule "deps/expect"]
path = deps/expect
url = https://github.com/hymkor/expect
ignore = dirty
38 changes: 33 additions & 5 deletions CMakeLists.txt
@@ -1,23 +1,51 @@
cmake_minimum_required(VERSION 3.22.1)

project(tripleS)

set(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR})
project(tppsss)

add_executable(${PROJECT_NAME}
src/main.cpp
)

set_target_properties(${PROJECT_NAME} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY $<1:${CMAKE_SOURCE_DIR}>
)

add_subdirectory(src)

file(MAKE_DIRECTORY data/auth)

find_package(CURL REQUIRED)

include_directories(
src/include
"${CURL_INCLUDE_DIRS}"
${CURL_INCLUDE_DIRS}
)

target_link_libraries(${PROJECT_NAME}
controlTheory
CURL::libcurl
)
)

option(BUILD_DEPS "Initialize dependencies while configuring" OFF)
if(BUILD_DEPS)
if(EXISTS ${CMAKE_SOURCE_DIR}/.git)
execute_process(COMMAND git submodule update --init --recursive
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
if(EXISTS ${CMAKE_SOURCE_DIR}/deps/expect/make.cmd)
execute_process(COMMAND ${CMAKE_SOURCE_DIR}/deps/expect/make.cmd
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/deps/expect
RESULT_VARIABLE EXPECT_MAKE_RESULT
)
if(EXPECT_MAKE_RESULT EQUAL "0")
message(STATUS "Expect.lua executable created in ${CMAKE_SOURCE_DIR}/deps/expect/")
else()
message(WARNING "Expect.lua executable creation failed")
endif()
else()
message(WARNING "Expect.lua files corrupted")
endif()
else()
message(WARNING "Dependency configuration failed")
endif()
endif()
14 changes: 14 additions & 0 deletions data/SCMData.csv
Expand Up @@ -20,3 +20,17 @@ lowest_price,volume,median_price,time
15.68,396,15.48,Thu Apr 07 07:57:51 2022
15.67,456,15.61,Fri Apr 08 05:01:24 2022
15.67,456,15.61,Fri Apr 08 05:02:02 2022
15.61,494,16.10,Sat Apr 09 03:02:13 2022
15.87,484,15.85,Sat Apr 09 06:59:57 2022
15.91,462,15.43,Sun Apr 10 06:49:44 2022
15.68,462,15.43,Sun Apr 10 06:51:03 2022
15.68,462,15.43,Sun Apr 10 06:52:08 2022
15.68,462,15.43,Sun Apr 10 07:00:13 2022
15.68,462,15.43,Sun Apr 10 07:01:35 2022
15.61,476,15.71,Sun Apr 10 07:20:37 2022
15.66,476,15.71,Sun Apr 10 07:28:41 2022
15.64,473,15.66,Sun Apr 10 13:43:44 2022
16.59,473,15.66,Sun Apr 10 13:48:13 2022
15.45,467,16.16,Sun Apr 10 14:29:17 2022
16.13,467,16.16,Sun Apr 10 15:05:20 2022
15.65,475,15.62,Sun Apr 10 15:27:03 2022
1 change: 1 addition & 0 deletions deps/expect
Submodule expect added at 59df0c
22 changes: 6 additions & 16 deletions scripts/bootstrap.ps1
@@ -1,20 +1,10 @@
if(-not(Test-Path -LiteralPath '.\data\')){
try{
New-Item -Path '.\data\' -ItemType Directory -ErrorAction Stop | Out-Null #-Force
}
catch{
Write-Error -Message "Unable to create data directory. Error: $_" -ErrorAction Stop
}
}
param($deps)

if(-not(Test-Path -LiteralPath '.\data\auth')){
try{
New-Item -Path '.\data\auth' -ItemType Directory -ErrorAction Stop | Out-Null #-Force
}
catch{
Write-Error -Message "Unable to create authentication directory. Error: $_" -ErrorAction Stop
}
if($deps -eq 'on'){
cmake -S . -B .\build\ -DBUILD_DEPS=ON
}
else{
cmake -S . -B .\build\ -DBUILD_DEPS=OFF
}

cmake -S . -B .\build\
cmake --build .\build\
16 changes: 16 additions & 0 deletions scripts/exampleExpect.lua
@@ -0,0 +1,16 @@
echo(true)
if spawn(arg[0]..[[\..\..\tppsss.exe]]) then
timeout = 2
RC = expect("[y/n]")
timeout = 3600
echo(false)
if RC==0 then
send("n\r")
end
expect("Online")
send("setup\r")
expect("cookie:")
send(arg[1].."\r")
expect("steamLoginSecure set")
send("break\r")
end
7 changes: 7 additions & 0 deletions scripts/exampleExpectLua.ps1
@@ -0,0 +1,7 @@
param($STEAM_LOGIN_COOKIE)

$pathToScripts = $MyInvocation.MyCommand.Path

$env:Path += ";$pathToScripts\..\..\deps\expect\"

expect.exe $pathToScripts\..\exampleExpect.lua $STEAM_LOGIN_COOKIE

0 comments on commit f5f3e75

Please sign in to comment.