From 45ff555b4fbda9efe3c323fd5d2a9dfb6d64be80 Mon Sep 17 00:00:00 2001 From: "Jan \"yenda\" Trmal" Date: Fri, 4 Nov 2022 15:56:06 -0400 Subject: [PATCH 01/33] Create cmake.yml --- .github/workflows/cmake.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/cmake.yml diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml new file mode 100644 index 0000000..136d4da --- /dev/null +++ b/.github/workflows/cmake.yml @@ -0,0 +1,37 @@ +name: CMake + +on: + push: + branches: [ "winport" ] + pull_request: + branches: [ "winport" ] + +env: + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) + BUILD_TYPE: Release + +jobs: + build: + # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. + # You can convert this to a matrix build if you need cross-platform coverage. + # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix + runs-on: windows-2019 + + steps: + - uses: actions/checkout@v3 + + - name: Configure CMake + # 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}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + + - name: Build + # Build your program with the given configuration + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + + - name: Test + working-directory: ${{github.workspace}}/build + # Execute tests defined by the CMake configuration. + # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail + run: ctest -C ${{env.BUILD_TYPE}} + From cf97c67ef7d0ac1cdd91600c6af32b363c237210 Mon Sep 17 00:00:00 2001 From: "Jan \"yenda\" Trmal" Date: Fri, 4 Nov 2022 16:42:20 -0400 Subject: [PATCH 02/33] Update cmake.yml --- .github/workflows/cmake.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 136d4da..8bac800 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -8,7 +8,7 @@ on: env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) - BUILD_TYPE: Release + BUILD_TYPE: Debug jobs: build: @@ -19,6 +19,17 @@ jobs: steps: - uses: actions/checkout@v3 + + - name: Get Conan + # You may pin to the exact commit or the version. + # uses: turtlebrowser/get-conan@368dfd1b36f811723d7db981352dd77cd69c2c9e + uses: turtlebrowser/get-conan@v1.1 + + - name: Create default profile + run: conan profile new default --detect + + - name: Install dependencies + run: conan install . -s build_type=${{env.BUILD_TYPE}} --install-folder=${{github.workspace}}/build - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. From e6f69126ff6dbd89f5322b1de2f7ac9c302fde92 Mon Sep 17 00:00:00 2001 From: "Jan \"yenda\" Trmal" Date: Fri, 4 Nov 2022 16:45:24 -0400 Subject: [PATCH 03/33] Create conanfile --- conanfile | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 conanfile diff --git a/conanfile b/conanfile new file mode 100644 index 0000000..459673d --- /dev/null +++ b/conanfile @@ -0,0 +1,6 @@ +[generators] +cmake + +[requires] +zlib/1.2.11 +icu/71.1 From 65c502fc68434893a0c38344d080234153a00532 Mon Sep 17 00:00:00 2001 From: "Jan \"yenda\" Trmal" Date: Fri, 4 Nov 2022 16:47:29 -0400 Subject: [PATCH 04/33] Create conanfile.txt --- conanfile.txt | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 conanfile.txt diff --git a/conanfile.txt b/conanfile.txt new file mode 100644 index 0000000..459673d --- /dev/null +++ b/conanfile.txt @@ -0,0 +1,6 @@ +[generators] +cmake + +[requires] +zlib/1.2.11 +icu/71.1 From 5d62a89a138d4e283f557777ca208f905e87413b Mon Sep 17 00:00:00 2001 From: "Jan \"yenda\" Trmal" Date: Fri, 4 Nov 2022 17:01:37 -0400 Subject: [PATCH 05/33] Update CMakeLists.txt --- CMakeLists.txt | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f6189db..2fe9f34 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,12 @@ project(openfst) include(CTest) + +if (WIN32) + include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) + conan_basic_setup() +endif () + + find_package(ICU COMPONENTS data i18n io test tu uc) if (ICU_FOUND) include_directories(${ICU_INCLUDE_DIRS}) @@ -17,13 +24,13 @@ set(CMAKE_MACOSX_RPATH 1) set(CMAKE_CXX_STANDARD 11) if (WIN32) - add_definitions(/bigobj) + add_definitions(-DNOMINMAX -D_USE_MATH_DEFINES -DFST_NO_DYNAMIC_LINKING) + add_compile_options(/W0 /bigobj /wd4244 /wd4267 ) set(WHOLEFST "/WHOLEARCHIVE:fst") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${WHOLEFST}") - #set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS 1) - #this must be disabled unless the previous option (CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS) is enabled option(BUILD_SHARED_LIBS "Build shared libraries" OFF) else() + set(CMAKE_POSITION_INDEPENDENT_CODE ON) option(BUILD_SHARED_LIBS "Build shared libraries" ON) endif (WIN32) From 74f18122d8e89979b3bfd1177ad81129d9c6457c Mon Sep 17 00:00:00 2001 From: "Jan \"yenda\" Trmal" Date: Mon, 7 Nov 2022 12:26:42 -0500 Subject: [PATCH 06/33] Update cmake.yml --- .github/workflows/cmake.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 8bac800..7becb2b 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -39,10 +39,12 @@ jobs: - name: Build # Build your program with the given configuration run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} - - - name: Test - working-directory: ${{github.workspace}}/build - # Execute tests defined by the CMake configuration. - # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail - run: ctest -C ${{env.BUILD_TYPE}} + env: + CMAKE_BUILD_PARALLEL_LEVEL: 4 + +# - name: Test +# working-directory: ${{github.workspace}}/build +# # Execute tests defined by the CMake configuration. +# # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail +# run: ctest -C ${{env.BUILD_TYPE}} From 9e54b761e61f6f67e72028dbb79cfc3ad2112abb Mon Sep 17 00:00:00 2001 From: "Jan \"yenda\" Trmal" Date: Mon, 7 Nov 2022 12:35:53 -0500 Subject: [PATCH 07/33] Update cmake.yml --- .github/workflows/cmake.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 7becb2b..5df0777 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -8,15 +8,15 @@ on: env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) - BUILD_TYPE: Debug + XX_BUILD_TYPE: Debug jobs: - build: - # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. - # You can convert this to a matrix build if you need cross-platform coverage. - # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix - runs-on: windows-2019 - + job_matrix: + strategy: + matrix: + os: [windows-2019, windows-2022] + build_type: [Release, Debug] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 @@ -29,16 +29,16 @@ jobs: run: conan profile new default --detect - name: Install dependencies - run: conan install . -s build_type=${{env.BUILD_TYPE}} --install-folder=${{github.workspace}}/build + run: conan install . -s build_type=${{matrix.build_type}} --install-folder=${{github.workspace}}/build - name: Configure CMake # 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}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} - name: Build # Build your program with the given configuration - run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} env: CMAKE_BUILD_PARALLEL_LEVEL: 4 From 9d7ad594f7a22cd7a98b1685ec651e49d2f2c891 Mon Sep 17 00:00:00 2001 From: "Jan \"yenda\" Trmal" Date: Mon, 7 Nov 2022 12:48:33 -0500 Subject: [PATCH 08/33] Update conanfile --- conanfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile b/conanfile index 459673d..dfa921d 100644 --- a/conanfile +++ b/conanfile @@ -3,4 +3,4 @@ cmake [requires] zlib/1.2.11 -icu/71.1 +icu/[>65.0] From 7bbdad2eb4e7b44cfb71d8388c9440ab5979942d Mon Sep 17 00:00:00 2001 From: "Jan \"yenda\" Trmal" Date: Mon, 7 Nov 2022 12:52:21 -0500 Subject: [PATCH 09/33] Update conanfile.txt --- conanfile.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conanfile.txt b/conanfile.txt index 459673d..8998763 100644 --- a/conanfile.txt +++ b/conanfile.txt @@ -2,5 +2,5 @@ cmake [requires] -zlib/1.2.11 -icu/71.1 +zlib/[>1.0.0] +icu/[>65.0] From 1f90b551c83c1dc2a14285f56539c4bb59a926a2 Mon Sep 17 00:00:00 2001 From: "Jan \"yenda\" Trmal" Date: Mon, 7 Nov 2022 12:56:14 -0500 Subject: [PATCH 10/33] Update cmake.yml --- .github/workflows/cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 5df0777..876cc33 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -29,7 +29,7 @@ jobs: run: conan profile new default --detect - name: Install dependencies - run: conan install . -s build_type=${{matrix.build_type}} --install-folder=${{github.workspace}}/build + run: conan install . -s build_type=${{matrix.build_type}} --install-folder=${{github.workspace}}/build --build=missing - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. From 5f2d11f69cec0d7ab2afb692c1adbbcf2ae4e617 Mon Sep 17 00:00:00 2001 From: "Jan \"yenda\" Trmal" Date: Mon, 7 Nov 2022 13:34:34 -0500 Subject: [PATCH 11/33] Update cmake.yml --- .github/workflows/cmake.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 876cc33..4900a21 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -41,10 +41,10 @@ jobs: run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} env: CMAKE_BUILD_PARALLEL_LEVEL: 4 - # - name: Test # working-directory: ${{github.workspace}}/build # # Execute tests defined by the CMake configuration. # # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail # run: ctest -C ${{env.BUILD_TYPE}} - + - name: Install + run: cmake --install . --config ${{matrix.build_type}} --prefix ${{matrix.os}}-${{matrix.build_type}} From a1a93afc682a146e4e6aeab79eb88418d77f03d7 Mon Sep 17 00:00:00 2001 From: "Jan \"yenda\" Trmal" Date: Mon, 7 Nov 2022 13:45:13 -0500 Subject: [PATCH 12/33] Update cmake.yml --- .github/workflows/cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 4900a21..835476a 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -47,4 +47,4 @@ jobs: # # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail # run: ctest -C ${{env.BUILD_TYPE}} - name: Install - run: cmake --install . --config ${{matrix.build_type}} --prefix ${{matrix.os}}-${{matrix.build_type}} + run: cmake --install . --config ${{matrix.build_type}} --prefix ${{github.workspace}}/${{matrix.os}}-${{matrix.build_type}} From 80c462a47638c8a9aa1e8ed45722a25f451a7031 Mon Sep 17 00:00:00 2001 From: "Jan \"yenda\" Trmal" Date: Mon, 7 Nov 2022 13:58:58 -0500 Subject: [PATCH 13/33] Update cmake.yml --- .github/workflows/cmake.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 835476a..6bc8907 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -47,4 +47,6 @@ jobs: # # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail # run: ctest -C ${{env.BUILD_TYPE}} - name: Install - run: cmake --install . --config ${{matrix.build_type}} --prefix ${{github.workspace}}/${{matrix.os}}-${{matrix.build_type}} + run: cmake -v --install . --config ${{matrix.build_type}} --prefix ${{github.workspace}}/${{matrix.os}}-${{matrix.build_type}} + + From ddcafa0e9aaf59130d7e103710dd9e2cb64eb524 Mon Sep 17 00:00:00 2001 From: "Jan \"yenda\" Trmal" Date: Mon, 7 Nov 2022 14:10:31 -0500 Subject: [PATCH 14/33] Update cmake.yml --- .github/workflows/cmake.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 6bc8907..b174dcf 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -34,7 +34,7 @@ jobs: - name: Configure CMake # 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}}/build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} + run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/${{matrix.os}}-${{matrix.build_type}} - name: Build # Build your program with the given configuration @@ -47,6 +47,6 @@ jobs: # # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail # run: ctest -C ${{env.BUILD_TYPE}} - name: Install - run: cmake -v --install . --config ${{matrix.build_type}} --prefix ${{github.workspace}}/${{matrix.os}}-${{matrix.build_type}} + run: cmake -v --install . --config ${{matrix.build_type}} From 9053b56116728041e2a61a515821bab5f5799e16 Mon Sep 17 00:00:00 2001 From: "Jan \"yenda\" Trmal" Date: Mon, 7 Nov 2022 14:24:42 -0500 Subject: [PATCH 15/33] Update cmake.yml --- .github/workflows/cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index b174dcf..b3d21de 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -47,6 +47,6 @@ jobs: # # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail # run: ctest -C ${{env.BUILD_TYPE}} - name: Install - run: cmake -v --install . --config ${{matrix.build_type}} + run: cmake -v --build ${{github.workspace}}/build --target INSTALL --config ${{matrix.build_type}} From dfd0afbc3e8a5fed39d15e42b15ad2270eec6cff Mon Sep 17 00:00:00 2001 From: "Jan \"yenda\" Trmal" Date: Mon, 7 Nov 2022 14:37:51 -0500 Subject: [PATCH 16/33] Update cmake.yml --- .github/workflows/cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index b3d21de..922bebe 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -47,6 +47,6 @@ jobs: # # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail # run: ctest -C ${{env.BUILD_TYPE}} - name: Install - run: cmake -v --build ${{github.workspace}}/build --target INSTALL --config ${{matrix.build_type}} + run: cmake -v --build ${{github.workspace}}/build --target INSTALL From e77ca536a6d259153eea9c306933d695f845e429 Mon Sep 17 00:00:00 2001 From: "Jan \"yenda\" Trmal" Date: Mon, 7 Nov 2022 14:53:03 -0500 Subject: [PATCH 17/33] Update cmake.yml --- .github/workflows/cmake.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 922bebe..381ae6b 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -47,6 +47,9 @@ jobs: # # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail # run: ctest -C ${{env.BUILD_TYPE}} - name: Install - run: cmake -v --build ${{github.workspace}}/build --target INSTALL + run: | + cmake --version + cmake --help + cmake -v --build ${{github.workspace}}/build --target INSTALL From ae2af43d8c756a2e1d77b13b96fa96b4d701506c Mon Sep 17 00:00:00 2001 From: "Jan \"yenda\" Trmal" Date: Mon, 7 Nov 2022 15:10:35 -0500 Subject: [PATCH 18/33] Update cmake.yml --- .github/workflows/cmake.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 381ae6b..19f5ce9 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -49,7 +49,8 @@ jobs: - name: Install run: | cmake --version - cmake --help - cmake -v --build ${{github.workspace}}/build --target INSTALL + cmake --install + mkdir ${{github.workspace}}\${{matrix.os}}-${{matrix.build_type}} + cmake --install ${{github.workspace}}/build --prefix ${{github.workspace}}\${{matrix.os}}-${{matrix.build_type}} From bd5d0b6b40d608bb85bfb40504cc10b8d6070d87 Mon Sep 17 00:00:00 2001 From: "Jan \"yenda\" Trmal" Date: Mon, 7 Nov 2022 15:21:21 -0500 Subject: [PATCH 19/33] Update cmake.yml --- .github/workflows/cmake.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 19f5ce9..430abcb 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -48,9 +48,7 @@ jobs: # run: ctest -C ${{env.BUILD_TYPE}} - name: Install run: | - cmake --version - cmake --install mkdir ${{github.workspace}}\${{matrix.os}}-${{matrix.build_type}} - cmake --install ${{github.workspace}}/build --prefix ${{github.workspace}}\${{matrix.os}}-${{matrix.build_type}} - + cmake --install ${{github.workspace}}/build --prefix ${{github.workspace}}\${{matrix.os}}-${{matrix.build_type}} --config ${{matrix.build_type}} + From 1f30214ed28b06a5a23ae51dfeb35f9c8b3e798c Mon Sep 17 00:00:00 2001 From: "Jan \"yenda\" Trmal" Date: Mon, 7 Nov 2022 15:47:38 -0500 Subject: [PATCH 20/33] Update cmake.yml --- .github/workflows/cmake.yml | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 430abcb..269baf2 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -50,5 +50,31 @@ jobs: run: | mkdir ${{github.workspace}}\${{matrix.os}}-${{matrix.build_type}} cmake --install ${{github.workspace}}/build --prefix ${{github.workspace}}\${{matrix.os}}-${{matrix.build_type}} --config ${{matrix.build_type}} - + tar czf ${{matrix.os}}-${{matrix.build_type}}.tar.gz ${{matrix.os}}-${{matrix.build_type}}/ + + - name: Create Draft Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: 1 + release_name: ${{github.workspace}}\${{matrix.os}}-${{matrix.build_type}} + draft: true + prerelease: false + + - uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./${{matrix.os}}-${{matrix.build_type}}.tar.gz + asset_name: ${{matrix.os}}-${{matrix.build_type}}.tar.gz + asset_content_type: application/gzip + + - uses: eregon/publish-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + release_id: ${{ steps.create_release.outputs.id }} From 696a4581917c00c240a41218b6ff2032c9e53c76 Mon Sep 17 00:00:00 2001 From: "Jan \"yenda\" Trmal" Date: Mon, 7 Nov 2022 16:00:10 -0500 Subject: [PATCH 21/33] Update cmake.yml --- .github/workflows/cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 269baf2..1bb7f1e 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -50,7 +50,7 @@ jobs: run: | mkdir ${{github.workspace}}\${{matrix.os}}-${{matrix.build_type}} cmake --install ${{github.workspace}}/build --prefix ${{github.workspace}}\${{matrix.os}}-${{matrix.build_type}} --config ${{matrix.build_type}} - tar czf ${{matrix.os}}-${{matrix.build_type}}.tar.gz ${{matrix.os}}-${{matrix.build_type}}/ + tar -czf ${{matrix.os}}-${{matrix.build_type}}.tar.gz ${{github.workspace}}\${{matrix.os}}-${{matrix.build_type}}\ - name: Create Draft Release id: create_release From 939c57f5358027a58e375bf67af2dfc2248b69a9 Mon Sep 17 00:00:00 2001 From: "Jan \"yenda\" Trmal" Date: Mon, 7 Nov 2022 16:15:17 -0500 Subject: [PATCH 22/33] Update cmake.yml --- .github/workflows/cmake.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 1bb7f1e..8f2b913 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -48,6 +48,7 @@ jobs: # run: ctest -C ${{env.BUILD_TYPE}} - name: Install run: | + echo on mkdir ${{github.workspace}}\${{matrix.os}}-${{matrix.build_type}} cmake --install ${{github.workspace}}/build --prefix ${{github.workspace}}\${{matrix.os}}-${{matrix.build_type}} --config ${{matrix.build_type}} tar -czf ${{matrix.os}}-${{matrix.build_type}}.tar.gz ${{github.workspace}}\${{matrix.os}}-${{matrix.build_type}}\ From 388d865c62c82df984459b6658f16cdb09ea6cb1 Mon Sep 17 00:00:00 2001 From: "Jan \"yenda\" Trmal" Date: Mon, 7 Nov 2022 16:27:48 -0500 Subject: [PATCH 23/33] Update cmake.yml --- .github/workflows/cmake.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 8f2b913..c26ca17 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -49,9 +49,11 @@ jobs: - name: Install run: | echo on - mkdir ${{github.workspace}}\${{matrix.os}}-${{matrix.build_type}} - cmake --install ${{github.workspace}}/build --prefix ${{github.workspace}}\${{matrix.os}}-${{matrix.build_type}} --config ${{matrix.build_type}} - tar -czf ${{matrix.os}}-${{matrix.build_type}}.tar.gz ${{github.workspace}}\${{matrix.os}}-${{matrix.build_type}}\ + mkdir ${{github.workspace}}/${{matrix.os}}-${{matrix.build_type}} + cmake --install ${{github.workspace}}/build --prefix ${{github.workspace}}/${{matrix.os}}-${{matrix.build_type}} --config ${{matrix.build_type}} + tar -czf + tar -czf ${{matrix.os}}-${{matrix.build_type}}.tar.gz + tar -czf ${{matrix.os}}-${{matrix.build_type}}.tar.gz ${{github.workspace}}/${{matrix.os}}-${{matrix.build_type}} - name: Create Draft Release id: create_release From 1d41d8850a137af0f86adef5d8c9dd5ecb4efd3e Mon Sep 17 00:00:00 2001 From: "Jan \"yenda\" Trmal" Date: Mon, 7 Nov 2022 19:24:38 -0500 Subject: [PATCH 24/33] Update cmake.yml --- .github/workflows/cmake.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index c26ca17..c457b13 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -51,9 +51,8 @@ jobs: echo on mkdir ${{github.workspace}}/${{matrix.os}}-${{matrix.build_type}} cmake --install ${{github.workspace}}/build --prefix ${{github.workspace}}/${{matrix.os}}-${{matrix.build_type}} --config ${{matrix.build_type}} - tar -czf - tar -czf ${{matrix.os}}-${{matrix.build_type}}.tar.gz - tar -czf ${{matrix.os}}-${{matrix.build_type}}.tar.gz ${{github.workspace}}/${{matrix.os}}-${{matrix.build_type}} + cd ${{github.workspace}} + tar -czf ${{matrix.os}}-${{matrix.build_type}}.tar.gz ${{matrix.os}}-${{matrix.build_type}} - name: Create Draft Release id: create_release @@ -62,7 +61,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: 1 - release_name: ${{github.workspace}}\${{matrix.os}}-${{matrix.build_type}} + release_name: ${{matrix.os}}-${{matrix.build_type}} draft: true prerelease: false From 14f6ffd04dca5b0126c99ff8ccf676d6c484c71a Mon Sep 17 00:00:00 2001 From: "Jan \"yenda\" Trmal" Date: Tue, 8 Nov 2022 09:32:19 -0500 Subject: [PATCH 25/33] Update cmake.yml --- .github/workflows/cmake.yml | 70 ++++++++++++++++++++++--------------- 1 file changed, 41 insertions(+), 29 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index c457b13..ff781f9 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -11,12 +11,29 @@ env: XX_BUILD_TYPE: Debug jobs: + create_github_release: + runs-on: ubuntu-latest + outputs: + create_release_output: ${{ steps.create_release.output }} + steps: + - name: Create Draft Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: 1 + release_name: ${{matrix.os}}-${{matrix.build_type}} + draft: true + prerelease: false + job_matrix: strategy: matrix: os: [windows-2019, windows-2022] build_type: [Release, Debug] runs-on: ${{ matrix.os }} + needs: [create_github_release] steps: - uses: actions/checkout@v3 @@ -36,47 +53,42 @@ jobs: # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/${{matrix.os}}-${{matrix.build_type}} - - name: Build - # Build your program with the given configuration - run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} - env: - CMAKE_BUILD_PARALLEL_LEVEL: 4 -# - name: Test -# working-directory: ${{github.workspace}}/build -# # Execute tests defined by the CMake configuration. -# # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail -# run: ctest -C ${{env.BUILD_TYPE}} +# - name: Build +# # Build your program with the given configuration +# run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} +# env: +# CMAKE_BUILD_PARALLEL_LEVEL: 4 +## - name: Test +## working-directory: ${{github.workspace}}/build +## # Execute tests defined by the CMake configuration. +## # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail +## run: ctest -C ${{env.BUILD_TYPE}} +# - name: Install +# run: | +# echo on +# mkdir ${{github.workspace}}/${{matrix.os}}-${{matrix.build_type}} +# cmake --install ${{github.workspace}}/build --prefix ${{github.workspace}}/${{matrix.os}}-${{matrix.build_type}} --config ${{matrix.build_type}} +# cd ${{github.workspace}} +# tar -czf ${{matrix.os}}-${{matrix.build_type}}.tar.gz ${{matrix.os}}-${{matrix.build_type}} - name: Install run: | echo on - mkdir ${{github.workspace}}/${{matrix.os}}-${{matrix.build_type}} - cmake --install ${{github.workspace}}/build --prefix ${{github.workspace}}/${{matrix.os}}-${{matrix.build_type}} --config ${{matrix.build_type}} cd ${{github.workspace}} - tar -czf ${{matrix.os}}-${{matrix.build_type}}.tar.gz ${{matrix.os}}-${{matrix.build_type}} + tar -czf ${{matrix.os}}-${{matrix.build_type}}.tar.gz build - - name: Create Draft Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: 1 - release_name: ${{matrix.os}}-${{matrix.build_type}} - draft: true - prerelease: false - uses: actions/upload-release-asset@v1.0.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ steps.create_release.outputs.upload_url }} + upload_url: ${{ needs.create_github_release.outputs.create_release_output.upload_url}} asset_path: ./${{matrix.os}}-${{matrix.build_type}}.tar.gz asset_name: ${{matrix.os}}-${{matrix.build_type}}.tar.gz asset_content_type: application/gzip - - uses: eregon/publish-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - release_id: ${{ steps.create_release.outputs.id }} + #- uses: eregon/publish-release@v1 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # with: + # release_id: ${{ steps.create_release.outputs.id }} From 47ed9c10b2d45a740a90b572b7e9d0f6f0441ffb Mon Sep 17 00:00:00 2001 From: "Jan \"yenda\" Trmal" Date: Tue, 8 Nov 2022 09:36:49 -0500 Subject: [PATCH 26/33] Update cmake.yml --- .github/workflows/cmake.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index ff781f9..137972f 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -14,7 +14,7 @@ jobs: create_github_release: runs-on: ubuntu-latest outputs: - create_release_output: ${{ steps.create_release.output }} + upload_url: ${{ steps.create_release.output.upload_url }} steps: - name: Create Draft Release id: create_release @@ -81,7 +81,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ needs.create_github_release.outputs.create_release_output.upload_url}} + upload_url: ${{ needs.create_github_release.outputs.upload_url}} asset_path: ./${{matrix.os}}-${{matrix.build_type}}.tar.gz asset_name: ${{matrix.os}}-${{matrix.build_type}}.tar.gz asset_content_type: application/gzip From d5436ec4d193065a3b57ef0e29f65817828ae80f Mon Sep 17 00:00:00 2001 From: "Jan \"yenda\" Trmal" Date: Tue, 8 Nov 2022 09:44:43 -0500 Subject: [PATCH 27/33] Update cmake.yml --- .github/workflows/cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 137972f..3fcd4de 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -14,7 +14,7 @@ jobs: create_github_release: runs-on: ubuntu-latest outputs: - upload_url: ${{ steps.create_release.output.upload_url }} + upload_url: ${{ steps.create_release.outputs.upload_url }} steps: - name: Create Draft Release id: create_release From 303c57d62aca4bc47f51c206aa9b195fac787929 Mon Sep 17 00:00:00 2001 From: "Jan \"yenda\" Trmal" Date: Tue, 8 Nov 2022 09:50:25 -0500 Subject: [PATCH 28/33] Update cmake.yml --- .github/workflows/cmake.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 3fcd4de..bdcedd4 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -22,8 +22,8 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: 1 - release_name: ${{matrix.os}}-${{matrix.build_type}} + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} draft: true prerelease: false From 22e49b0841351e778d7cfa8aa858464defeea6f2 Mon Sep 17 00:00:00 2001 From: "Jan \"yenda\" Trmal" Date: Tue, 8 Nov 2022 10:02:20 -0500 Subject: [PATCH 29/33] Update cmake.yml --- .github/workflows/cmake.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index bdcedd4..55e1e88 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -15,6 +15,7 @@ jobs: runs-on: ubuntu-latest outputs: upload_url: ${{ steps.create_release.outputs.upload_url }} + id: ${{ steps.create_release.outputs.id }} steps: - name: Create Draft Release id: create_release @@ -86,9 +87,13 @@ jobs: asset_name: ${{matrix.os}}-${{matrix.build_type}}.tar.gz asset_content_type: application/gzip - #- uses: eregon/publish-release@v1 - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # with: - # release_id: ${{ steps.create_release.outputs.id }} + publish_github_release: + needs: [create_github_release, job_matrix] + runs-on: ubuntu-latest + steps: + - uses: eregon/publish-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + release_id: ${{ needs.create_github_release.outputs.id}} From f5d6df70b4b445f7dc64eefdd90876110afa9efe Mon Sep 17 00:00:00 2001 From: "Jan \"yenda\" Trmal" Date: Tue, 8 Nov 2022 10:13:01 -0500 Subject: [PATCH 30/33] Update cmake.yml --- .github/workflows/cmake.yml | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 55e1e88..9484a76 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -54,30 +54,24 @@ jobs: # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/${{matrix.os}}-${{matrix.build_type}} -# - name: Build -# # Build your program with the given configuration -# run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} -# env: -# CMAKE_BUILD_PARALLEL_LEVEL: 4 -## - name: Test -## working-directory: ${{github.workspace}}/build -## # Execute tests defined by the CMake configuration. -## # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail -## run: ctest -C ${{env.BUILD_TYPE}} -# - name: Install -# run: | -# echo on -# mkdir ${{github.workspace}}/${{matrix.os}}-${{matrix.build_type}} -# cmake --install ${{github.workspace}}/build --prefix ${{github.workspace}}/${{matrix.os}}-${{matrix.build_type}} --config ${{matrix.build_type}} -# cd ${{github.workspace}} -# tar -czf ${{matrix.os}}-${{matrix.build_type}}.tar.gz ${{matrix.os}}-${{matrix.build_type}} + - name: Build + # Build your program with the given configuration + run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} + env: + CMAKE_BUILD_PARALLEL_LEVEL: 4 +# - name: Test +# working-directory: ${{github.workspace}}/build +# # Execute tests defined by the CMake configuration. +# # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail +# run: ctest -C ${{env.BUILD_TYPE}} - name: Install run: | echo on + mkdir ${{github.workspace}}/${{matrix.os}}-${{matrix.build_type}} + cmake --install ${{github.workspace}}/build --prefix ${{github.workspace}}/${{matrix.os}}-${{matrix.build_type}} --config ${{matrix.build_type}} cd ${{github.workspace}} - tar -czf ${{matrix.os}}-${{matrix.build_type}}.tar.gz build - - + tar -czf ${{matrix.os}}-${{matrix.build_type}}.tar.gz ${{matrix.os}}-${{matrix.build_type}} + - uses: actions/upload-release-asset@v1.0.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From ab5433878d989e7cc7d731ba3eaa97231650594d Mon Sep 17 00:00:00 2001 From: "Jan \"yenda\" Trmal" Date: Tue, 8 Nov 2022 11:03:47 -0500 Subject: [PATCH 31/33] Update cmake.yml --- .github/workflows/cmake.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 9484a76..c2cd73a 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -23,8 +23,8 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} + tag_name: ${{ github.run_number }} + release_name: Release ${{ github.run_number }} ${{ github.ref }} draft: true prerelease: false From 662355c49abd2f74d10d030bdc6f416cdd00e572 Mon Sep 17 00:00:00 2001 From: "Jan \"yenda\" Trmal" Date: Tue, 8 Nov 2022 11:58:48 -0500 Subject: [PATCH 32/33] Update cmake.yml --- .github/workflows/cmake.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index c2cd73a..4e21691 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -17,14 +17,20 @@ jobs: upload_url: ${{ steps.create_release.outputs.upload_url }} id: ${{ steps.create_release.outputs.id }} steps: + - uses: actions/checkout@v3 + - name: Get OpenFST version + id: get_openfst_version + run: | + OPENFST_VER_STRING=$(grep -E 'AC_INIT\(\[OpenFst\]' configure.ac | sed 's/.*\[\([0-9][0-9.]*\)\].*/\1/g') + echo "openfst_ver=${OPENFST_VER_STRING}" >> $GITHUB_ENV - name: Create Draft Release id: create_release uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ github.run_number }} - release_name: Release ${{ github.run_number }} ${{ github.ref }} + tag_name: autorelease/${{ github.run_number }} + release_name: Release ${{ steps.get_openfst_version.outputs.openfst_ver }}-${{ github.run_number }} draft: true prerelease: false From cf255df5bd3bfc1dc4d200074a7600957c72c03c Mon Sep 17 00:00:00 2001 From: "Jan \"yenda\" Trmal" Date: Tue, 8 Nov 2022 12:02:53 -0500 Subject: [PATCH 33/33] Update cmake.yml --- .github/workflows/cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 4e21691..94c23d8 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -22,7 +22,7 @@ jobs: id: get_openfst_version run: | OPENFST_VER_STRING=$(grep -E 'AC_INIT\(\[OpenFst\]' configure.ac | sed 's/.*\[\([0-9][0-9.]*\)\].*/\1/g') - echo "openfst_ver=${OPENFST_VER_STRING}" >> $GITHUB_ENV + echo "openfst_ver=${OPENFST_VER_STRING}" >> $GITHUB_OUTPUT - name: Create Draft Release id: create_release uses: actions/create-release@v1