Skip to content

Commit 6914d41

Browse files
committed
Update PR action
1 parent 3b17c8b commit 6914d41

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

.github/workflows/pr.yml

+21-3
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,33 @@ jobs:
66
clang-format:
77
runs-on: ubuntu-22.04
88
steps:
9-
- uses: actions/checkout@v2
9+
- uses: actions/checkout@v3
1010
- name: clang-format
1111
run: |
12-
docker run --rm -v ${PWD}:/src ghcr.io/wiiu-env/clang-format:13.0.0-2 -r ./src
12+
docker run --rm -v ${PWD}:/src ghcr.io/wiiu-env/clang-format:13.0.0-2 -r ./src
13+
check-build-with-logging:
14+
runs-on: ubuntu-22.04
15+
needs: clang-format
16+
steps:
17+
- uses: actions/checkout@v3
18+
- name: build binary with logging
19+
run: |
20+
docker build . -t builder
21+
docker run --rm -v ${PWD}:/project builder make DEBUG=VERBOSE
22+
docker run --rm -v ${PWD}:/project builder make clean
23+
docker run --rm -v ${PWD}:/project builder make DEBUG=1
1324
build-binary:
1425
runs-on: ubuntu-22.04
1526
needs: clang-format
1627
steps:
17-
- uses: actions/checkout@v2
28+
- uses: actions/checkout@v3
29+
- name: create version.h
30+
run: |
31+
git_hash=$(git rev-parse --short "${{ github.event.pull_request.head.sha }}")
32+
cat <<EOF > ./src/version.h
33+
#pragma once
34+
#define VERSION_EXTRA " (nightly-$git_hash)"
35+
EOF
1836
- name: build binary
1937
run: |
2038
docker build . -t builder

0 commit comments

Comments
 (0)