mirror of
https://github.com/krahets/hello-algo.git
synced 2026-04-05 19:50:25 +08:00
Translate all code to English (#1836)
* Review the EN heading format. * Fix pythontutor headings. * Fix pythontutor headings. * bug fixes * Fix headings in **/summary.md * Revisit the CN-to-EN translation for Python code using Claude-4.5 * Revisit the CN-to-EN translation for Java code using Claude-4.5 * Revisit the CN-to-EN translation for Cpp code using Claude-4.5. * Fix the dictionary. * Fix cpp code translation for the multipart strings. * Translate Go code to English. * Update workflows to test EN code. * Add EN translation for C. * Add EN translation for CSharp. * Add EN translation for Swift. * Trigger the CI check. * Revert. * Update en/hash_map.md * Add the EN version of Dart code. * Add the EN version of Kotlin code. * Add missing code files. * Add the EN version of JavaScript code. * Add the EN version of TypeScript code. * Fix the workflows. * Add the EN version of Ruby code. * Add the EN version of Rust code. * Update the CI check for the English version code. * Update Python CI check. * Fix cmakelists for en/C code. * Fix Ruby comments
This commit is contained in:
21
.github/workflows/cpp.yml
vendored
21
.github/workflows/cpp.yml
vendored
@@ -6,10 +6,18 @@ name: C++
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
paths: ["codes/cpp/**/*.cpp", "codes/cpp/**/*.hpp"]
|
||||
paths:
|
||||
- "codes/cpp/**/*.cpp"
|
||||
- "codes/cpp/**/*.hpp"
|
||||
- "en/codes/cpp/**/*.cpp"
|
||||
- "en/codes/cpp/**/*.hpp"
|
||||
pull_request:
|
||||
branches: ["main"]
|
||||
paths: ["codes/cpp/**/*.cpp", "codes/cpp/**/*.hpp"]
|
||||
paths:
|
||||
- "codes/cpp/**/*.cpp"
|
||||
- "codes/cpp/**/*.hpp"
|
||||
- "en/codes/cpp/**/*.cpp"
|
||||
- "en/codes/cpp/**/*.hpp"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
@@ -30,6 +38,7 @@ jobs:
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
build_type: [Release]
|
||||
c_compiler: [gcc, clang, cl]
|
||||
code-dir: ["codes/cpp", "en/codes/cpp"]
|
||||
include:
|
||||
- os: windows-latest
|
||||
c_compiler: cl
|
||||
@@ -55,18 +64,18 @@ jobs:
|
||||
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
|
||||
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
|
||||
run: >
|
||||
cmake -B ${{ github.workspace }}/codes/cpp/build
|
||||
cmake -B ${{ github.workspace }}/${{ matrix.code-dir }}/build
|
||||
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
|
||||
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
|
||||
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
|
||||
-S ${{ github.workspace }}/codes/cpp
|
||||
-S ${{ github.workspace }}/${{ matrix.code-dir }}
|
||||
|
||||
- name: Build
|
||||
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
|
||||
run: cmake --build ${{ github.workspace }}/codes/cpp/build --config ${{ matrix.build_type }}
|
||||
run: cmake --build ${{ github.workspace }}/${{ matrix.code-dir }}/build --config ${{ matrix.build_type }}
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{ github.workspace }}/codes/cpp/build
|
||||
working-directory: ${{ github.workspace }}/${{ matrix.code-dir }}/build
|
||||
# Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
|
||||
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
|
||||
run: ctest --build-config ${{ matrix.build_type }}
|
||||
|
||||
Reference in New Issue
Block a user