Skip to content

Commit 92891c5

Browse files
author
kali
committed
git action
1 parent 77d3564 commit 92891c5

File tree

3 files changed

+70
-32
lines changed

3 files changed

+70
-32
lines changed

.github/workflows/Release.yml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,37 +19,28 @@ jobs:
1919
# You can convert this to a matrix build if you need cross-platform coverage.
2020
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
2121
runs-on: ubuntu-latest
22-
container: gcc:13
2322

2423
steps:
2524
- uses: actions/checkout@v4
2625

27-
- name: Install system dep
28-
run: |
29-
apt update -y
30-
apt install -y cmake
31-
apt install -y python3-pip
32-
shell: bash
33-
3426
# Update references
3527
- name: Git Sumbodule Update
3628
run: |
37-
git config --global --add safe.directory /__w/C2LinuxImplant/C2LinuxImplant
3829
git submodule update --init
39-
30+
4031
- name: Get Conan
41-
run: |
42-
pip3 install conan --break-system-packages
43-
shell: bash
32+
# You may pin to the exact commit or the version.
33+
# uses: turtlebrowser/get-conan@c171f295f3f507360ee018736a6608731aa2109d
34+
uses: turtlebrowser/[email protected]
4435

4536
- name: Create default profile
4637
run: conan profile detect
4738

4839
- name: Configure CMake
49-
run: cmake -B /__w/C2LinuxImplant/C2LinuxImplant/build -DWITH_TESTS=OFF -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=/__w/C2LinuxImplant/C2LinuxImplant/conan_provider.cmake
40+
run: cmake -B ${{github.workspace}}/build -DWITH_TESTS=OFF -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=${{github.workspace}}/conan_provider.cmake
5041

5142
- name: Build
52-
run: cmake --build /__w/C2LinuxImplant/C2LinuxImplant/build --config ${{env.BUILD_TYPE}} -j 18
43+
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 18
5344

5445
- name: Prep release
5546
shell: bash

.github/workflows/Tests.yml

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,45 +12,36 @@ jobs:
1212
# You can convert this to a matrix build if you need cross-platform coverage.
1313
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
1414
runs-on: ubuntu-latest
15-
container: gcc:13
1615

1716
steps:
1817
- uses: actions/checkout@v4
19-
20-
- name: Install system dep
21-
run: |
22-
apt update -y
23-
apt install -y cmake
24-
apt install -y python3-pip
25-
shell: bash
2618

2719
# Update references
2820
- name: Git Sumbodule Update
2921
run: |
30-
git config --global --add safe.directory /__w/C2LinuxImplant/C2LinuxImplant
3122
git submodule update --init
32-
23+
3324
- name: Get Conan
34-
run: |
35-
pip3 install conan --break-system-packages
36-
shell: bash
25+
# You may pin to the exact commit or the version.
26+
# uses: turtlebrowser/get-conan@c171f295f3f507360ee018736a6608731aa2109d
27+
uses: turtlebrowser/[email protected]
3728

3829
- name: Create default profile
3930
run: conan profile detect
4031

4132
- name: Configure CMake
42-
run: cmake -B /__w/C2LinuxImplant/C2LinuxImplant/build -DWITH_TESTS=ON -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=/__w/C2LinuxImplant/C2LinuxImplant/conan_provider.cmake
33+
run: cmake -B ${{github.workspace}}/build -DWITH_TESTS=OFF -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=${{github.workspace}}/conan_provider.cmake
4334

4435
- name: Build
45-
run: cmake --build /__w/C2LinuxImplant/C2LinuxImplant/build --config ${{env.BUILD_TYPE}} -j 18
36+
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 18
4637

4738
- name: Run unit tests
4839
run: ctest --test-dir build -C Release
4940

5041
- name: Configure CMake like the release
51-
run: cmake -B /__w/C2LinuxImplant/C2LinuxImplant/buildRelease -DWITH_TESTS=OFF -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=/__w/C2LinuxImplant/C2LinuxImplant/conan_provider.cmake
42+
run: cmake -B ${{github.workspace}}/buildRelease -DWITH_TESTS=OFF -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=${{github.workspace}}/conan_provider.cmake
5243

5344
- name: Build like the release
54-
run: cmake --build /__w/C2LinuxImplant/C2LinuxImplant/buildRelease -j 18
45+
run: cmake --build ${{github.workspace}}/buildRelease -j 18
5546

5647

.github/workflows/TestsGcc13.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Tests
2+
3+
on: workflow_dispatch
4+
5+
env:
6+
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
7+
BUILD_TYPE: Release
8+
9+
jobs:
10+
buildAndTest:
11+
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
12+
# You can convert this to a matrix build if you need cross-platform coverage.
13+
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
14+
runs-on: ubuntu-latest
15+
container: gcc:13
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Install system dep
21+
run: |
22+
apt update -y
23+
apt install -y cmake
24+
apt install -y python3-pip
25+
shell: bash
26+
27+
# Update references
28+
- name: Git Sumbodule Update
29+
run: |
30+
git config --global --add safe.directory /__w/C2LinuxImplant/C2LinuxImplant
31+
git submodule update --init
32+
33+
- name: Get Conan
34+
run: |
35+
pip3 install conan --break-system-packages
36+
shell: bash
37+
38+
- name: Create default profile
39+
run: conan profile detect
40+
41+
- name: Configure CMake
42+
run: cmake -B /__w/C2LinuxImplant/C2LinuxImplant/build -DWITH_TESTS=ON -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=/__w/C2LinuxImplant/C2LinuxImplant/conan_provider.cmake
43+
44+
- name: Build
45+
run: cmake --build /__w/C2LinuxImplant/C2LinuxImplant/build --config ${{env.BUILD_TYPE}} -j 18
46+
47+
- name: Run unit tests
48+
run: ctest --test-dir build -C Release
49+
50+
- name: Configure CMake like the release
51+
run: cmake -B /__w/C2LinuxImplant/C2LinuxImplant/buildRelease -DWITH_TESTS=OFF -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=/__w/C2LinuxImplant/C2LinuxImplant/conan_provider.cmake
52+
53+
- name: Build like the release
54+
run: cmake --build /__w/C2LinuxImplant/C2LinuxImplant/buildRelease -j 18
55+
56+

0 commit comments

Comments
 (0)