Skip to content

Commit

Permalink
Add CI pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Nopey committed Jan 6, 2025
1 parent a3fb27d commit 8b5bf67
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Check

on:
workflow_dispatch:
push:
branches:
- master
pull_request:
repository_dispatch:
types: [run_build]

jobs:

check_languages:
name: Check Languages
runs-on: windows-latest

env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"

steps:
- name: Export Github Actions cache environment variables
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- uses: actions/checkout@v4
- name: Check out openomf sources
uses: actions/checkout@v4
with:
repository: 'omf2097/openomf'
path: 'openomf'
- name: Check out VCPKG
uses: actions/checkout@v4
with:
repository: 'microsoft/vcpkg'
path: 'openomf/vcpkg'
- uses: lukka/get-cmake@latest
- uses: ilammy/msvc-dev-cmd@v1
- name: Install VCPKG Dependencies, Configure CMake
run: >
cmake -S openomf -B build
--toolchain vcpkg/scripts/buildsystems/vcpkg.cmake
-DVCPKG_TARGET_TRIPLET="x64-windows-static"
-A x64
-DBUILD_LANGUAGES=ON
- name: Build languagetool.exe
run: cmake --build build --config Release --target languagetool
- name: Check Languages
shell: bash
run: |
echo "Expecting $(cat langstr_count) language strings, as specified in the langstr_count file."
for LANG in *.TXT; do
echo "Checking $LANG"
build/Release/languagetool.exe --import "$LANG" --check-count "$(cat langstr_count)" > ignored_log || exit 1
done
1 change: 1 addition & 0 deletions langstr_count
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
458

0 comments on commit 8b5bf67

Please sign in to comment.