Skip to content

Commit

Permalink
Ci fix (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
zyr17 authored Feb 13, 2024
1 parent f3224f1 commit 45cefd2
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,15 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install mingw
run: choco install mingw --Version 8.1.0
- name: npm
run: |
npm ci
npm run-script package-win
- name: cmake
run: |
$env:Path = "C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin;" + $env:Path
git submodule update --init --recursive
mkdir bin
mkdir bin/release
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/debugci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- name: Install mingw
run: choco install mingw --Version 11.4.0
run: choco install mingw --Version 8.1.0
- name: npm
run: |
npm ci
npm run-script package-win
- name: cmake
run: |
$env:Path = "C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin;" + $env:Path
git submodule update --init --recursive
mkdir bin
mkdir bin/debug
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,16 @@ jobs:
run: |
brew install p7zip
7z a MajsoulPaipuAnalyzer-macos-x64.7z MajsoulPaipuAnalyzer-macos-x64 -m0=LZMA2 -mmt
- uses: actions/upload-artifact@v2
with:
name: MajsoulPaipuAnalyzer-macos-x64.7z
path: MajsoulPaipuAnalyzer-macos-x64.7z
- uses: actions/upload-artifact@v2
with:
name: PaipuAnalyzer
path: bin/release/PaipuAnalyzer
- name: Upload to release
if: github.event_name != 'workflow_dispatch'
run: |
cp .github/asset.js .
node asset.js ${{ secrets.ACCESS_TOKEN }} $GITHUB_EVENT_PATH $GITHUB_REPOSITORY MajsoulPaipuAnalyzer-macos-x64.7z application/octet_stream
12 changes: 12 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,15 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install mingw
run: choco install mingw --Version 8.1.0
- name: npm
run: |
npm ci
npm run-script package-win
- name: cmake
run: |
$env:Path = "C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin;" + $env:Path
git submodule update --init --recursive
mkdir bin
mkdir bin/release
Expand All @@ -48,7 +51,16 @@ jobs:
mv result MajsoulPaipuAnalyzer-win-x64
- name: archive
run: 7z a MajsoulPaipuAnalyzer-win-x64.7z MajsoulPaipuAnalyzer-win-x64 -m0=LZMA2 -mmt
- uses: actions/upload-artifact@v2
with:
name: MajsoulPaipuAnalyzer-win-x64.7z
path: MajsoulPaipuAnalyzer-win-x64.7z
- uses: actions/upload-artifact@v2
with:
name: PaipuAnalyzer
path: bin/release/PaipuAnalyzer.exe
- name: Upload to release
if: github.event_name != 'workflow_dispatch'
run: |
echo $GITHUB_EVENT_PATH $GITHUB_REPOSITORY
echo $env:GITHUB_EVENT_PATH $env:GITHUB_REPOSITORY
Expand Down
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ set (CMAKE_C_COMPILER g++)
aux_source_directory(./src DIR_MAIN)
aux_source_directory(./src/CJsonObject DIR_LIB)
add_executable(PaipuAnalyzer ${DIR_MAIN} ${DIR_LIB})
SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -std=c++11 -O0 -Wall -g -ggdb -D DEBUG")
IF(APPLE)
SET(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -std=c++11 -O3")
SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -std=c++11 -O0 -Wall -g -ggdb -D DEBUG")
ELSE()
SET(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -std=c++11 -O3 -static")
SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -std=c++11 -O0 -Wall -g -ggdb -D DEBUG -static")
ENDIF()

set(FAKE_TARGET fakeTarget)
Expand Down
2 changes: 1 addition & 1 deletion src/algo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ namespace SR{
if (roomnumber == INVALIDROOM)
roomnumber= 0;
}
std::cout << "stablerank " << round << ' ' << roomnumber << std::endl;
// std::cout << "stablerank " << round << ' ' << roomnumber << std::endl;
assert(roomnumber == 0 || roomnumber == 100 || (roomnumber >= 0 && roomnumber < ROOMNUMBER && considerroom[roomnumber]));
auto &rd = rds[roomnumber];
if (!(rd.pts[0].size())){
Expand Down

0 comments on commit 45cefd2

Please sign in to comment.