Skip to content

Commit 9626060

Browse files
committed
Add unit test for CMake installation
This makes use of the new reusable GitHub Actions workflow added by infra-workflows commit 65cf13a216d835190d8da70d456a1307431373eb. It tests whether, when the library is installed, it can be picked up by CMake in a consumer project, and whether that project can successfully build a main.cpp file that includes identity.hpp.
1 parent 48638ee commit 9626060

7 files changed

Lines changed: 34 additions & 15 deletions

File tree

.github/workflows/ci_tests.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ on:
1313

1414
jobs:
1515
beman-submodule-check:
16-
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-submodule-check.yml@1.1.0
16+
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-submodule-check.yml@1.2.1
1717

1818
preset-test:
19-
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-preset-test.yml@1.1.0
19+
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-preset-test.yml@1.2.1
2020
with:
2121
matrix_config: >
2222
[
@@ -31,7 +31,7 @@ jobs:
3131
]
3232
3333
build-and-test:
34-
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-build-and-test.yml@1.1.0
34+
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-build-and-test.yml@1.2.1
3535
with:
3636
matrix_config: >
3737
{
@@ -134,7 +134,14 @@ jobs:
134134
]
135135
}
136136
137+
install-test:
138+
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-install-test.yml@1.2.1
139+
with:
140+
image: ghcr.io/bemanproject/infra-containers-gcc:latest
141+
cxx_standard: 26
142+
main_header: identity.hpp
143+
137144
create-issue-when-fault:
138145
needs: [preset-test, build-and-test]
139146
if: failure() && github.event_name == 'schedule'
140-
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-create-issue-when-fault.yml@1.1.0
147+
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-create-issue-when-fault.yml@1.2.1

.github/workflows/pre-commit-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ on:
1010

1111
jobs:
1212
pre-commit:
13-
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-pre-commit.yml@1.1.0
13+
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-pre-commit.yml@1.2.1

.github/workflows/pre-commit-update.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
jobs:
1111
auto-update-pre-commit:
12-
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-update-pre-commit.yml@1.1.0
12+
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-update-pre-commit.yml@1.2.1
1313
secrets:
1414
APP_ID: ${{ secrets.AUTO_PR_BOT_APP_ID }}
1515
PRIVATE_KEY: ${{ secrets.AUTO_PR_BOT_PRIVATE_KEY }}

cookiecutter/cookiecutter.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"description": "Short project description.",
77
"godbolt_link": "https://www.example.com",
88
"_copy_without_render": [
9-
"infra",
10-
".github/workflows"
11-
]
9+
"infra"
10+
],
11+
"_jinja2_env_vars": {"trim_blocks": true}
1212
}

cookiecutter/{{cookiecutter.project_name}}/.github/workflows/ci_tests.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ on:
1313

1414
jobs:
1515
beman-submodule-check:
16-
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-submodule-check.yml@1.1.0
16+
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-submodule-check.yml@1.2.1
1717

1818
preset-test:
19-
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-preset-test.yml@1.1.0
19+
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-preset-test.yml@1.2.1
2020
with:
2121
matrix_config: >
2222
[
@@ -31,7 +31,7 @@ jobs:
3131
]
3232
3333
build-and-test:
34-
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-build-and-test.yml@1.1.0
34+
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-build-and-test.yml@1.2.1
3535
with:
3636
matrix_config: >
3737
{
@@ -134,7 +134,16 @@ jobs:
134134
]
135135
}
136136
137+
install-test:
138+
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-install-test.yml@1.2.1
139+
with:
140+
image: ghcr.io/bemanproject/infra-containers-gcc:latest
141+
cxx_standard: 26
142+
{% if cookiecutter.project_name == "exemplar" %}
143+
main_header: identity.hpp
144+
{% endif %}
145+
137146
create-issue-when-fault:
138147
needs: [preset-test, build-and-test]
139148
if: failure() && github.event_name == 'schedule'
140-
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-create-issue-when-fault.yml@1.1.0
149+
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-create-issue-when-fault.yml@1.2.1

cookiecutter/{{cookiecutter.project_name}}/.github/workflows/pre-commit-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ on:
1010

1111
jobs:
1212
pre-commit:
13-
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-pre-commit.yml@1.1.0
13+
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-pre-commit.yml@1.2.1

cookiecutter/{{cookiecutter.project_name}}/.github/workflows/pre-commit-update.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@ on:
77
schedule:
88
- cron: "0 16 * * 0"
99

10+
{% raw -%}
1011
jobs:
1112
auto-update-pre-commit:
12-
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-update-pre-commit.yml@1.1.0
13+
uses: bemanproject/infra-workflows/.github/workflows/reusable-beman-update-pre-commit.yml@1.2.1
1314
secrets:
1415
APP_ID: ${{ secrets.AUTO_PR_BOT_APP_ID }}
1516
PRIVATE_KEY: ${{ secrets.AUTO_PR_BOT_PRIVATE_KEY }}
17+
{%- endraw %}
18+

0 commit comments

Comments
 (0)