Skip to content

Commit 5cbe918

Browse files
committed
DiscordCoreAPI Release 2.0.7
* Updated to keep in track with Jsonifier dependency. * Added a detect-cpu-architecture script.
1 parent 974d245 commit 5cbe918

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+942
-478
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Build-and-Test-CLANG-Ubuntu
22

33
on:
4+
workflow_dispatch:
45
push:
56
branches:
67
- main
@@ -13,41 +14,42 @@ jobs:
1314
strategy:
1415
fail-fast: false
1516
matrix:
16-
clang: [18]
17+
clang: [19]
1718
build_type: [Debug, Release]
1819
std: [20]
1920

2021
steps:
21-
- uses: actions/checkout@v3
22+
- uses: actions/checkout@v4
2223

2324
- name: Install the latest Clang compiler.
24-
working-directory: ./
25+
working-directory: Tests
2526
run: |
27+
sudo apt update && sudo apt upgrade
2628
wget https://apt.llvm.org/llvm.sh
27-
chmod +x llvm.sh
28-
sudo ./llvm.sh 18
29+
chmod u+x llvm.sh
30+
sudo ./llvm.sh 19
2931
3032
- name: Update Vcpkg and install other dependencies.
31-
run: |
32-
sudo apt-get update --fix-missing
33-
sudo apt-get upgrade --fix-missing
33+
run: |
34+
sudo apt-get update
35+
sudo apt-get upgrade
3436
sudo apt-get install nasm
35-
cd /usr/local/share/vcpkg
36-
./bootstrap-vcpkg.sh
37-
git stash
38-
git pull
39-
vcpkg update
37+
/usr/local/share/vcpkg/vcpkg update
38+
39+
- name: Set TERM environment variable
40+
run: echo "export TERM=xterm" >> $GITHUB_ENV
4041

4142
- name: Install the dependencies.
43+
working-directory: ./
4244
run: |
43-
vcpkg install opus:x64-linux
44-
vcpkg install libsodium:x64-linux
45-
vcpkg install openssl:x64-linux
45+
/usr/local/share/vcpkg/vcpkg install opus:x64-linux
46+
/usr/local/share/vcpkg/vcpkg install libsodium:x64-linux
47+
/usr/local/share/vcpkg/vcpkg install openssl:x64-linux
4648
4749
- name: Configure CMake
4850
working-directory: ./
4951
run: |
50-
cmake -S . -B ./Build -DCMAKE_CXX_COMPILER=/usr/bin/clang++-18 -DDEV=true -DDISCORDCOREAPI_TEST=true -DVCPKG_ROOT_DIR=/usr/local/share/vcpkg
52+
cmake -S . -B ./Build -DCMAKE_CXX_COMPILER=/usr/bin/clang++-19 -DDEV=true -DDISCORDCOREAPI_TEST=true -DVCPKG_ROOT_DIR="/usr/local/share/vcpkg/"
5153
5254
- name: Build the Test
5355
working-directory: ./Build
@@ -57,6 +59,6 @@ jobs:
5759
- name: Run the Test
5860
working-directory: ./Build/Tests
5961
run: |
60-
chmod u+x ./DiscordCoreAPITest
62+
sudo chmod u+x ./DiscordCoreAPITest
6163
./DiscordCoreAPITest
6264
continue-on-error: true
Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Build-and-Test-GCC-MacOS
22

33
on:
4+
workflow_dispatch:
45
push:
56
branches:
67
- main
@@ -13,26 +14,26 @@ jobs:
1314
strategy:
1415
fail-fast: false
1516
matrix:
16-
gcc: [13]
17+
gnucxx: [14]
1718
build_type: [Debug, Release]
1819
std: [20]
1920

2021
steps:
21-
- uses: actions/checkout@v3
22+
- uses: actions/checkout@v4
2223

23-
- name: Install the latest g++ compiler.
24+
- name: Install the latest GnuCXX compiler.
2425
run: |
25-
brew install gcc
26+
brew install gcc --force-bottle
2627
2728
- name: Update Vcpkg and install other dependencies.
28-
run: |
29-
brew update
29+
run: |
30+
brew update
3031
brew upgrade
3132
brew install nasm
3233
brew install nano
3334
brew install autoconf
3435
brew install automake
35-
brew install glibtoolize
36+
brew install libtool
3637
which autoconf
3738
export PATH="/opt/homebrew/bin/autoconf:$PATH"
3839
git clone https://github.com/Microsoft/Vcpkg ./vcpkg2
@@ -42,25 +43,28 @@ jobs:
4243
git pull
4344
./vcpkg update
4445
45-
- name: Set TERM environment variable
46-
run: echo "export TERM=xterm" >> $GITHUB_ENV
47-
4846
- name: Install the dependencies.
49-
working-directory: /Users/runner/work/DiscordCoreAPI/DiscordCoreAPI/vcpkg2/
5047
run: |
51-
/Users/runner/work/DiscordCoreAPI/DiscordCoreAPI/vcpkg2/vcpkg install opus:x64-osx
52-
/Users/runner/work/DiscordCoreAPI/DiscordCoreAPI/vcpkg2/vcpkg install libsodium:x64-osx
53-
/Users/runner/work/DiscordCoreAPI/DiscordCoreAPI/vcpkg2/vcpkg install openssl:x64-osx
48+
which g++
49+
./vcpkg2/vcpkg install opus:x64-osx
50+
./vcpkg2/vcpkg install libsodium:x64-osx
51+
./vcpkg2/vcpkg install openssl:x64-osx
5452
55-
- name: Print failure log on failure
56-
if: ${{ failure() }}
57-
run: cat /Users/runner/work/DiscordCoreAPI/DiscordCoreAPI/vcpkg2/buildtrees/libsodium/autoconf-x64-osx-err.log
53+
- name: Check if file exists (for debugging)
54+
if: failure()
55+
run: |
56+
if [ -f /Users/runner/work/DiscordCoreAPI/DiscordCoreAPI/vcpkg2/buildtrees/libsodium/autoconf-x64-osx-err.log ]; then echo "File exists"; else echo "File does not exist"; fi
5857
58+
- name: Print file contents upon failure
59+
if: failure()
60+
run: |
61+
echo "Command failed. Printing /Users/runner/work/DiscordCoreAPI/DiscordCoreAPI/vcpkg2/buildtrees/libsodium/autoconf-x64-osx-err.log contents:"
62+
cat /Users/runner/work/DiscordCoreAPI/DiscordCoreAPI/vcpkg2/buildtrees/libsodium/autoconf-x64-osx-err.log || echo "File not found or empty"
5963
6064
- name: Configure CMake
6165
working-directory: ./
6266
run: |
63-
cmake -S . -B ./Build -DCMAKE_CXX_COMPILER=/usr/local/opt/gcc@13/bin/g++-13 -DDEV=true -DDISCORDCOREAPI_TEST=true -DVCPKG_ROOT_DIR=./vcpkg2
67+
cmake -S . -B ./Build -DCMAKE_CXX_COMPILER=/usr/bin/g++-14 -DDEV=true -DDISCORDCOREAPI_TEST=true -DVCPKG_ROOT_DIR=/usr/local/share/vcpkg
6468
6569
- name: Build the Test
6670
working-directory: ./Build
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Build-and-Test-MSVC-Windows
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
- dev
9+
10+
jobs:
11+
Build:
12+
runs-on: windows-latest
13+
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
msvc: [2022]
18+
build_type: [Debug, Release]
19+
std: [20]
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: Update Vcpkg and install other dependencies
25+
run: |
26+
cd C:/vcpkg
27+
./bootstrap-vcpkg.bat
28+
git stash
29+
git pull
30+
vcpkg update
31+
32+
- name: Install the dependencies
33+
run: |
34+
vcpkg install opus:x64-windows
35+
vcpkg install libsodium:x64-windows
36+
vcpkg install openssl:x64-windows
37+
38+
- name: Configure CMake
39+
working-directory: ./
40+
run: |
41+
cmake -S . -B ./Build -DDEV=true -DVCPKG_ROOT_DIR=C:/vcpkg
42+
43+
- name: Build the Test
44+
working-directory: ./Build
45+
run: |
46+
cmake --build . --config=${{matrix.build_type}}
47+
48+
- name: Install the Test
49+
working-directory: ./Build/Tests
50+
run: |
51+
cmake --install ./ --config=${{matrix.build_type}}
52+
53+
- name: Run the Test
54+
working-directory: ./Tests/Install/${{matrix.build_type}}
55+
run: |
56+
./DiscordCoreAPITest.exe
57+
continue-on-error: true
58+
59+
- name: Clone DiscordCoreAPI-Binaries repository
60+
run: |
61+
git clone https://github.com/RealTimeChris/DiscordCoreAPI-Binaries.git ./DiscordCoreAPI-Binaries
62+
cd DiscordCoreAPI-Binaries
63+
git config user.name "GitHub Action"
64+
git config user.email "[email protected]"
65+
66+
- name: Copy build artifacts to DiscordCoreAPI-Binaries
67+
run: |
68+
cp -r ./Tests/Install/${{matrix.build_type}}/* ./DiscordCoreAPI-Binaries/${{matrix.build_type}}
69+
70+
- name: Commit and push changes to DiscordCoreAPI-Binaries
71+
working-directory: ./DiscordCoreAPI-Binaries
72+
run: |
73+
git add .
74+
git commit -m "Update binaries for ${{matrix.build_type}} build"
75+
git push https://x-access-token:${{ secrets.PAT_TOKEN }}@github.com/RealTimeChris/DiscordCoreAPI-Binaries.git main
76+
continue-on-error: true
Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Build-and-Test-MSVC-Windows
22

33
on:
4+
workflow_dispatch:
45
push:
56
branches:
67
- main
@@ -18,17 +19,17 @@ jobs:
1819
std: [20]
1920

2021
steps:
21-
- uses: actions/checkout@v3
22-
23-
- name: Update Vcpkg and install other dependencies.
22+
- uses: actions/checkout@v4
23+
24+
- name: Update Vcpkg and install other dependencies
2425
run: |
2526
cd C:/vcpkg
2627
./bootstrap-vcpkg.bat
2728
git stash
2829
git pull
2930
vcpkg update
3031
31-
- name: Install the dependencies.
32+
- name: Install the dependencies
3233
run: |
3334
vcpkg install opus:x64-windows
3435
vcpkg install libsodium:x64-windows
@@ -53,4 +54,23 @@ jobs:
5354
working-directory: ./Tests/Install/${{matrix.build_type}}
5455
run: |
5556
./DiscordCoreAPITest.exe
56-
continue-on-error: true
57+
continue-on-error: true
58+
59+
- name: Clone DiscordCoreAPI-Binaries repository
60+
run: |
61+
git clone https://github.com/RealTimeChris/DiscordCoreAPI-Binaries.git ./DiscordCoreAPI-Binaries
62+
cd DiscordCoreAPI-Binaries
63+
git config user.name "GitHub Action"
64+
git config user.email "[email protected]"
65+
66+
- name: Copy build artifacts to DiscordCoreAPI-Binaries
67+
run: |
68+
cp -r ./Tests/Install/${{matrix.build_type}}/* ./DiscordCoreAPI-Binaries/${{matrix.build_type}}
69+
70+
- name: Commit and push changes to DiscordCoreAPI-Binaries
71+
working-directory: ./DiscordCoreAPI-Binaries
72+
run: |
73+
git add .
74+
git commit -m "Update binaries for ${{matrix.build_type}} build"
75+
git push https://x-access-token:${{ secrets.PAT_TOKEN }}@github.com/RealTimeChris/DiscordCoreAPI-Binaries.git main
76+
continue-on-error: true

CMake/BuildFeatureTester.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
"C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin/cmake.exe" -S ./ -B ./Build -DCMAKE_BUILD_TYPE=Release
2+
"C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin/cmake.exe" --build ./Build --config=Release

CMake/BuildFeatureTester.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
cmake -S ./ -B ./Build -DCMAKE_BUILD_TYPE=Release
3+
cmake --build ./Build --config=Release

CMake/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
cmake_minimum_required(VERSION 3.10)
2+
project(FeatureDetection)
3+
set(CMAKE_CXX_STANDARD 17)
4+
# Add your source file(s)
5+
add_executable(feature_detector main.cpp)

0 commit comments

Comments
 (0)