forked from Mq-b/Loser-HomeWork
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (36 loc) · 1.16 KB
/
text-encoding.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Check file encoding
on:
workflow_dispatch:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get checker hash
id: computehash
uses: seepine/hash-files@v1
with:
# The working dir for the action.
# Default: ${{ github.workspace }}
# workdir: ''
# The patterns used to match files.
patterns: '.github/workflows/encodingcheck/**'
- name: Cache
id: cache
uses: actions/cache@v4
with:
path: .github/workflows/encodingcheck/build/encodingcheck
key: check-build-cache-${{ steps.computehash.outputs.hash }}
- name: Build
if: steps.cache.outputs.cache-hit != 'true'
run: |
cd .github/workflows/encodingcheck
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc-13 -DCMAKE_CXX_COMPILER=g++-13 -DBUILD_ENCODINGCHECK=true ..
cmake --build . -t encodingcheck -j
- name: Check
run: .github/workflows/encodingcheck/build/encodingcheck