Skip to content

Commit dd68ee7

Browse files
committed
Add CI pipeline
1 parent 2519d19 commit dd68ee7

2 files changed

Lines changed: 64 additions & 0 deletions

File tree

.github/workflows/check.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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+
env:
13+
OPENOMF_VERSION: '0.6.6'
14+
OPENOMF_ASSETS_URL: 'https://www.omf2097.com/pub/files/omf/omf2097-assets.zip'
15+
16+
jobs:
17+
18+
check_languages:
19+
name: Check Languages
20+
runs-on: windows-latest
21+
22+
env:
23+
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
24+
25+
steps:
26+
- name: Export Github Actions cache environment variables
27+
uses: actions/github-script@v7
28+
with:
29+
script: |
30+
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
31+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
32+
# other repos must be checked out *after* this one
33+
- uses: actions/checkout@v4
34+
# other repos..
35+
- name: Check out openomf sources
36+
uses: actions/checkout@v4
37+
with:
38+
repository: 'omf2097/openomf'
39+
path: 'openomf'
40+
- name: Check out VCPKG
41+
uses: actions/checkout@v4
42+
with:
43+
repository: 'microsoft/vcpkg'
44+
path: 'openomf/vcpkg'
45+
- uses: lukka/get-cmake@latest
46+
- uses: ilammy/msvc-dev-cmd@v1
47+
- name: Install VCPKG Dependencies, Configure CMake
48+
run: >
49+
cmake -S openomf -B build
50+
--toolchain vcpkg/scripts/buildsystems/vcpkg.cmake
51+
-DVCPKG_TARGET_TRIPLET="x64-windows-static"
52+
-A x64
53+
-DBUILD_LANGUAGES=ON
54+
- name: Build languagetool.exe
55+
run: cmake --build build --config Release --target languagetool
56+
- name: Check Languages
57+
shell: bash
58+
run: |
59+
echo "Expecting $(cat langstr_count) language strings, as specified in the langstr_count file."
60+
for LANG in *.TXT; do
61+
echo "Checking $LANG"
62+
build/Release/languagetool.exe --import "$LANG" --check-count "$(cat langstr_count)" > ignored_log || exit 1
63+
done

langstr_count

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
458

0 commit comments

Comments
 (0)