From 6f3187dea83d38e5e6bd6c7a0c44e13284f264d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B3=D0=BE=D1=80?= <148970641+Egor00f@users.noreply.github.com> Date: Sat, 9 Nov 2024 21:09:56 +0500 Subject: [PATCH 1/7] Create devcontainer.json --- .devcontainer/devcontainer.json | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..cc1731a --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,16 @@ + "image": "mcr.microsoft.com/devcontainers/cpp:debian-12", + "features": { + }, + + "customizations": { + "vscode": { + "extensions": [ + "ms-vscode.cmake-tools", + "usernamehw.errorlens", + "streetsidesoftware.code-spell-checker", + "streetsidesoftware.code-spell-checker-russian", + "ibm.output-colorizer" + ] + } + } +} From 537356d5feb9a9e23b1eea04e94712edcbee8098 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B3=D0=BE=D1=80?= <148970641+Egor00f@users.noreply.github.com> Date: Sat, 9 Nov 2024 16:24:18 +0000 Subject: [PATCH 2/7] fix devcontainer.json --- .devcontainer/devcontainer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index cc1731a..584bff5 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,3 +1,4 @@ +{ "image": "mcr.microsoft.com/devcontainers/cpp:debian-12", "features": { }, From 0baa7b470d538100643694c6bd83bf2ecc7eac09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B3=D0=BE=D1=80?= <148970641+Egor00f@users.noreply.github.com> Date: Sat, 9 Nov 2024 16:44:24 +0000 Subject: [PATCH 3/7] fix build in github codespaces --- .devcontainer/devcontainer.json | 3 ++- CMakeLists.txt | 1 + package/DEBIAN/control | 0 3 files changed, 3 insertions(+), 1 deletion(-) mode change 100644 => 100755 package/DEBIAN/control diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 584bff5..b2d633f 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -10,7 +10,8 @@ "usernamehw.errorlens", "streetsidesoftware.code-spell-checker", "streetsidesoftware.code-spell-checker-russian", - "ibm.output-colorizer" + "ibm.output-colorizer", + "chouzz.vscode-innosetup" ] } } diff --git a/CMakeLists.txt b/CMakeLists.txt index c60ca3c..0bd983c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,6 +9,7 @@ project( add_custom_target( Package COMMAND cp -f ${CMAKE_CURRENT_SOURCE_DIR}/install.sh ${CMAKE_CURRENT_SOURCE_DIR}/package/DEBIAN/postinst + COMMAND chmod 775 ${CMAKE_CURRENT_SOURCE_DIR}/package/DEBIAN/postinst COMMAND dpkg-deb --build ${CMAKE_CURRENT_SOURCE_DIR}/package ${CMAKE_CURRENT_BINARY_DIR}/package.deb WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ) diff --git a/package/DEBIAN/control b/package/DEBIAN/control old mode 100644 new mode 100755 From 0e3f85c0e3f68ec8fc24cead41975384d7e7f634 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B3=D0=BE=D1=80?= <148970641+Egor00f@users.noreply.github.com> Date: Sat, 9 Nov 2024 17:16:13 +0000 Subject: [PATCH 4/7] add installation path selection --- install.sh | 10 ++++++++++ installator.iss | 2 +- package/DEBIAN/control | 2 +- package/DEBIAN/dirs | 1 + 4 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 package/DEBIAN/dirs diff --git a/install.sh b/install.sh index ac80ce2..d5c19ba 100755 --- a/install.sh +++ b/install.sh @@ -30,8 +30,18 @@ check_utils(){ pwd + TOOLCHAIN_DIR="/home/autobuild/tools" +MESSAGE="Toolchain install path(default is $TOOLCHAIN_DIR): " + +echo -n $MESSAGE +read INPUT + +if [[ ! -z "$INPUT" ]]; then + TOOLCHAIN_DIR=$INPUT +fi + print_msg "Checking utilities..." diff --git a/installator.iss b/installator.iss index 21d2d5d..8149f6a 100644 --- a/installator.iss +++ b/installator.iss @@ -2,7 +2,7 @@ ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName "KolibriOS gcc toolchain" -#define MyAppVersion "0.1.3" +#define MyAppVersion "0.1.4" #define MyAppPublisher "Egor00f" #define MyAppURL "https://github.com/Egor00f/kolibrios-gcc-toolchain" diff --git a/package/DEBIAN/control b/package/DEBIAN/control index 15f06c1..fd324b6 100755 --- a/package/DEBIAN/control +++ b/package/DEBIAN/control @@ -1,5 +1,5 @@ Package: kos32-gcc -Version: 0.1.3 +Version: 0.1.4 Architecture: all Section: devel Depends: libc6-i386:amd64, libmpc3:amd64 diff --git a/package/DEBIAN/dirs b/package/DEBIAN/dirs new file mode 100644 index 0000000..a3d8927 --- /dev/null +++ b/package/DEBIAN/dirs @@ -0,0 +1 @@ +/home/autobuild/tools/ \ No newline at end of file From 87c29daf9e7d8c49f3ed62a004344333379879e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B3=D0=BE=D1=80?= <148970641+Egor00f@users.noreply.github.com> Date: Sat, 9 Nov 2024 17:21:40 +0000 Subject: [PATCH 5/7] add upload artifacts of packages && add github actions extension --- .devcontainer/devcontainer.json | 3 ++- .github/workflows/test.yml | 12 ++++++++++++ .vscode/extensions.json | 3 ++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index b2d633f..b7fdc8a 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -11,7 +11,8 @@ "streetsidesoftware.code-spell-checker", "streetsidesoftware.code-spell-checker-russian", "ibm.output-colorizer", - "chouzz.vscode-innosetup" + "chouzz.vscode-innosetup", + "github.vscode-github-actions" ] } } diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e5c40e3..a4e53c1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -60,6 +60,12 @@ jobs: cmake -B ${{ github.workspace }}/build cmake --build ${{ github.workspace }}/build --target Installer + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + # Upload entire repository + path: './build' + # Test Package package: runs-on: ubuntu-latest @@ -84,3 +90,9 @@ jobs: - name: Remove package run: sudo apt remove kos32-gcc + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + # Upload entire repository + path: './build' diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 58fb364..d801e45 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -3,6 +3,7 @@ "chouzz.vscode-innosetup", "streetsidesoftware.code-spell-checker", "streetsidesoftware.code-spell-checker-russian", - "ms-vscode.cmake-tools" + "ms-vscode.cmake-tools", + "github.vscode-github-actions" ] } \ No newline at end of file From 3dc15f3597d01fe5cb3da5a9329ad47c538ff1e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B3=D0=BE=D1=80?= <148970641+Egor00f@users.noreply.github.com> Date: Sat, 9 Nov 2024 17:27:22 +0000 Subject: [PATCH 6/7] fix upload package --- .github/workflows/test.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a4e53c1..b6c8daf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -76,6 +76,12 @@ jobs: run: | cmake -B ${{ github.workspace }}/build cmake --build ${{ github.workspace }}/build --target Package + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + # Upload entire repository + path: './build' - name: Install package run: sudo apt install ${{ github.workspace }}/build/package.deb @@ -91,8 +97,3 @@ jobs: - name: Remove package run: sudo apt remove kos32-gcc - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - # Upload entire repository - path: './build' From 99f3639668763094ab41e9ff1682c64da5578e75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B3=D0=BE=D1=80?= <148970641+Egor00f@users.noreply.github.com> Date: Sat, 9 Nov 2024 17:35:08 +0000 Subject: [PATCH 7/7] fix test build --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b6c8daf..b100bad 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/checkout@v4 - name: Run script - run: ${{ github.workspace }}/./install.sh + run: echo '/home/autobuild/tools' | ${{ github.workspace }}/./install.sh - name: Add toolchain to path run: echo "/home/autobuild/tools/win32/bin" >> $GITHUB_PATH @@ -84,7 +84,7 @@ jobs: path: './build' - name: Install package - run: sudo apt install ${{ github.workspace }}/build/package.deb + run: echo '/home/autobuild/tools' | sudo apt install ${{ github.workspace }}/build/package.deb -y - name: Add toolchain to path run: echo "/home/autobuild/tools/win32/bin" >> $GITHUB_PATH