Skip to content

Commit 31044ce

Browse files
committed
Rename CMake targets
1 parent c3677a9 commit 31044ce

File tree

8 files changed

+16
-57
lines changed

8 files changed

+16
-57
lines changed

.github/workflows/ci-cpp.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
run: |
2727
mkdir -p ./lib/json
2828
cd lib
29-
git clone https://github.com/google/googletest.git
29+
git clone --depth 1 --branch v1.13.0 https://github.com/google/googletest.git
3030
curl -sSL "https://github.com/nlohmann/json/releases/download/v3.11.2/json.hpp" --output json/json.hpp
3131
3232
- name: Build project

.github/workflows/publish.yml

+8-24
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
steps:
2525
- name: Checkout
2626
uses: actions/checkout@v3
27-
27+
2828
- name: Prepare builder
2929
run: |
3030
docker run --rm dockcross/${{ matrix.arch_name }} > ./dockcross
@@ -37,7 +37,7 @@ jobs:
3737
cd ./compiler/cpp/lib
3838
git clone --depth 1 --branch release-1.12.1 https://github.com/google/googletest.git
3939
curl -sSL https://github.com/nlohmann/json/releases/download/v3.11.2/json.hpp --output json/json.hpp
40-
40+
4141
- name: Configure
4242
run: ./dockcross cmake -Bbin -H./compiler/cpp -GNinja
4343

@@ -47,14 +47,7 @@ jobs:
4747
- name: Process build output - Linux
4848
if: ${{ startsWith(matrix.arch_name, 'linux') }}
4949
working-directory: bin
50-
run: |
51-
mv ./src/CCom_run ccomc
52-
chmod +x ccomc
53-
54-
- name: Process build output - Windows
55-
if: ${{ startsWith(matrix.arch_name, 'windows') }}
56-
working-directory: bin
57-
run: mv ./src/CCom_run.exe ccomc.exe
50+
run: chmod +x ccomc
5851

5952
- name: Upload artifact
6053
uses: actions/upload-artifact@v3
@@ -77,7 +70,7 @@ jobs:
7770

7871
- name: Set up QEMU
7972
uses: docker/setup-qemu-action@v2
80-
73+
8174
- name: Set up Docker Buildx
8275
uses: docker/setup-buildx-action@v2
8376

@@ -186,11 +179,11 @@ jobs:
186179
curl -sSf -u "${{ secrets.NEXUS_USERNAME }}:${{ secrets.NEXUS_PASSWORD }}" -H "Content-Type: multipart/form-data" --data-binary "@./ccom_${{ matrix.arch }}.deb" "${{ secrets.NEXUS_URL }}/ubuntu-xenial/"
187180
curl -sSf -u "${{ secrets.NEXUS_USERNAME }}:${{ secrets.NEXUS_PASSWORD }}" -H "Content-Type: multipart/form-data" --data-binary "@./ccom_${{ matrix.arch }}.deb" "${{ secrets.NEXUS_URL }}/ubuntu-trusty/"
188181
curl -sSf -u "${{ secrets.NEXUS_USERNAME }}:${{ secrets.NEXUS_PASSWORD }}" -H "Content-Type: multipart/form-data" --data-binary "@./ccom_${{ matrix.arch }}.deb" "${{ secrets.NEXUS_URL }}/ubuntu-jammy/"
189-
182+
190183
- name: Deploy to CentOS repo
191184
run: |
192185
curl -sSf -u "${{ secrets.NEXUS_USERNAME }}:${{ secrets.NEXUS_PASSWORD }}" -H "Content-Type: multipart/form-data" --upload-file ./ccom_${{ matrix.arch }}.rpm ${{ secrets.NEXUS_URL }}/centos/ccom/${{ steps.get_version.outputs.version }}/compose-generator-${{ matrix.arch }}.rpm
193-
186+
194187
- name: Deploy to Fedora repo
195188
run: |
196189
curl -sSf -u "${{ secrets.NEXUS_USERNAME }}:${{ secrets.NEXUS_PASSWORD }}" -H "Content-Type: multipart/form-data" --upload-file ./ccom_${{ matrix.arch }}.rpm ${{ secrets.NEXUS_URL }}/fedora/ccom/${{ steps.get_version.outputs.version }}/compose-generator-${{ matrix.arch }}.rpm
@@ -261,25 +254,16 @@ jobs:
261254
asset_name: ccom_${{ matrix.config.label }}_setup.msi
262255
tag: ${{ github.ref }}
263256

264-
265-
- uses: vedantmgoyal2009/winget-releaser@v1
266-
with:
267-
identifier: ChilliBits.CCom
268-
version: ${{ github.ref_name }}
269-
release-tag: ${{ github.ref_name }}
270-
token: ${{ secrets.CR_PAT }}
271-
272257
deploy-win-installers:
273258
name: Deploy installers
274259
if: startsWith(github.ref, 'refs/tags/')
275260
needs: build-win-installers
276261
runs-on: windows-latest
277262

278263
steps:
279-
- uses: vedantmgoyal2009/winget-releaser@v1
264+
- uses: vedantmgoyal2009/winget-releaser@v2
280265
with:
281266
identifier: ChilliBits.CCom
282267
version: ${{ github.ref }}
283268
release-tag: ${{ github.ref }}
284-
token: ${{ secrets.CR_PAT }}
285-
269+
token: ${{ secrets.CR_PAT }}

build.bat

-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,4 @@ cd ../bin
1010
cmake -DCMAKE_BUILD_TYPE=Release -G "CodeBlocks - MinGW Makefiles" ../compiler/cpp
1111
mingw32-make
1212

13-
move src\CCom_run.exe ccomc.exe
14-
1513
cd ..

build.sh

-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,4 @@ cd ../bin
99
cmake -DCMAKE_BUILD_TYPE=Release ../compiler/cpp
1010
make
1111

12-
mv ./src/CCom_run ./ccomc
13-
1412
cd ..

compiler/cpp/.run/CCom_run.run.xml

-10
This file was deleted.

compiler/cpp/.run/CCom_test.run.xml

-8
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,4 @@
77
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
88
</method>
99
</configuration>
10-
<configuration default="false" name="CCom_test" type="CMakeRunConfiguration" factoryName="Application" PROGRAM_PARAMS="&quot;false&quot; &quot;Test input&quot; &quot;{}&quot; &quot;//&quot; &quot;/*&quot; &quot;*/&quot;" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="CCom" TARGET_NAME="CCom_test" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="CCom" RUN_TARGET_NAME="CCom_test">
11-
<envs>
12-
<env name="WITH_TESTS" value="ON" />
13-
</envs>
14-
<method v="2">
15-
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
16-
</method>
17-
</configuration>
1810
</component>

compiler/cpp/src/CMakeLists.txt

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
set(BINARY ${CMAKE_PROJECT_NAME})
2-
31
set(SOURCES
42
main.cpp
53
util/JSONParser.cpp
@@ -13,6 +11,7 @@ set(SOURCES
1311
parser/Parser.cpp
1412
parser/Parser.h
1513
parser/ASTNodes.h
14+
parser/ASTNodes.cpp
1615
analyzer/Analyzer.cpp
1716
analyzer/Analyzer.h
1817
interpreter/Interpreter.cpp
@@ -25,6 +24,6 @@ set(SOURCES
2524
exception/UnknownDataTypeException.h
2625
exception/UnexpectedDataTypeException.h)
2726

28-
add_executable(${BINARY}_run ${SOURCES})
27+
add_executable(ccomc ${SOURCES})
2928

30-
add_library(${BINARY}_lib STATIC ${SOURCES} parser/ASTNodes.cpp)
29+
add_library(ccomclib STATIC ${SOURCES})

compiler/cpp/test/CMakeLists.txt

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
set(BINARY ${CMAKE_PROJECT_NAME}_test)
2-
3-
add_executable(${BINARY}
1+
add_executable(ccomctest
42
main.cpp
53
ReaderTest.cpp
64
LexerTest.cpp
@@ -12,8 +10,8 @@ add_executable(${BINARY}
1210
util/FileReader.cpp
1311
util/FileReader.h)
1412

15-
add_test(NAME ${BINARY} COMMAND ${BINARY})
13+
add_test(NAME ccomctest COMMAND ccomctest)
1614

17-
target_link_libraries(${BINARY} PUBLIC ${CMAKE_PROJECT_NAME}_lib gtest)
15+
target_link_libraries(ccomctest PUBLIC ccomclib gtest)
1816

19-
file(COPY test-files DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
17+
file(CREATE_LINK ${CMAKE_CURRENT_SOURCE_DIR}/test-files ${CMAKE_CURRENT_BINARY_DIR}/test-files SYMBOLIC)

0 commit comments

Comments
 (0)