|
| 1 | +name: Check |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + push: |
| 6 | + branches: |
| 7 | + - master |
| 8 | + pull_request: |
| 9 | + repository_dispatch: |
| 10 | + types: [run_build] |
| 11 | + |
| 12 | +jobs: |
| 13 | + |
| 14 | + check_languages: |
| 15 | + name: Check Languages |
| 16 | + runs-on: windows-latest |
| 17 | + |
| 18 | + env: |
| 19 | + VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite" |
| 20 | + |
| 21 | + steps: |
| 22 | + - name: Export Github Actions cache environment variables |
| 23 | + uses: actions/github-script@v7 |
| 24 | + with: |
| 25 | + script: | |
| 26 | + core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); |
| 27 | + core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); |
| 28 | + - uses: actions/checkout@v4 |
| 29 | + - name: Check out openomf sources |
| 30 | + uses: actions/checkout@v4 |
| 31 | + with: |
| 32 | + repository: 'omf2097/openomf' |
| 33 | + path: 'openomf' |
| 34 | + - name: Check out VCPKG |
| 35 | + uses: actions/checkout@v4 |
| 36 | + with: |
| 37 | + repository: 'microsoft/vcpkg' |
| 38 | + path: 'openomf/vcpkg' |
| 39 | + - uses: lukka/get-cmake@latest |
| 40 | + - uses: ilammy/msvc-dev-cmd@v1 |
| 41 | + - name: Install VCPKG Dependencies, Configure CMake |
| 42 | + run: > |
| 43 | + cmake -S openomf -B build |
| 44 | + --toolchain vcpkg/scripts/buildsystems/vcpkg.cmake |
| 45 | + -DVCPKG_TARGET_TRIPLET="x64-windows-static" |
| 46 | + -A x64 |
| 47 | + -DBUILD_LANGUAGES=ON |
| 48 | + - name: Build languagetool.exe |
| 49 | + run: cmake --build build --config Release --target languagetool |
| 50 | + - name: Check Languages |
| 51 | + shell: bash |
| 52 | + run: | |
| 53 | + echo "Expecting $(cat langstr_count) language strings, as specified in the langstr_count file." |
| 54 | + for LANG in *.TXT; do |
| 55 | + echo "Checking $LANG" |
| 56 | + build/Release/languagetool.exe --import "$LANG" --check-count "$(cat langstr_count)" > ignored_log || exit 1 |
| 57 | + done |
0 commit comments