From 2637fe5eed1f71f4898b97f20376d75894daa9f8 Mon Sep 17 00:00:00 2001 From: Mike Nolan Date: Wed, 22 Oct 2025 14:23:59 -0500 Subject: [PATCH] Fix scripts --- .onedev-buildspec.yml | 37 +++++++++++++++++------------- Packaging/CPKG/pack.tcross | 46 +++++++++++++++++++------------------- 2 files changed, 45 insertions(+), 38 deletions(-) diff --git a/.onedev-buildspec.yml b/.onedev-buildspec.yml index 2f8b584..21f5889 100644 --- a/.onedev-buildspec.yml +++ b/.onedev-buildspec.yml @@ -43,28 +43,23 @@ jobs: useTTY: true condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL - !CommandStep - name: Build and Publish Deb Package + name: Build and Publish Deb Package (Plucky) runInContainer: true - image: onedev.site.tesses.net/dependencies/debbuilder/jammy:latest + image: onedev.site.tesses.net/dependencies/debbuilder/plucky:latest interpreter: !DefaultInterpreter commands: | - mkdir artifacts apt update -y - apt install -y pkg-config git gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 gcc-mingw-w64-i686 g++-mingw-w64-i686 nsis + apt install -y pkg-config gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 gcc-mingw-w64-i686 g++-mingw-w64-i686 nsis cd Packaging/Linux - bash build-ubuntu-jammy.sh - bash push-ubuntu-jammy.sh + bash build-ubuntu-plucky.sh + bash push-ubuntu-plucky.sh + cd ../CPKG + bash winbuild.sh cd ../Windows bash build.sh - apt update -y - apt install -y crosslang - cd ../CPKG - bash pack_and_publish.sh envVars: - name: GITEA_AUTH value: '@secret:GITEA_AUTH@' - - name: CPKG_KEY - value: '@secret:CPKG_KEY@' useTTY: true condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL - !SCPCommandStep @@ -84,14 +79,26 @@ jobs: ln -s @build_number@ latest condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL - !CommandStep - name: Build and Publish Deb Package (Plucky) + name: Build and Publish Deb Package runInContainer: true - image: onedev.site.tesses.net/dependencies/debbuilder/plucky:latest + image: onedev.site.tesses.net/dependencies/debbuilder/jammy:latest interpreter: !DefaultInterpreter - commands: "apt update -y\napt install -y pkg-config \ncd Packaging/Linux\nbash build-ubuntu-plucky.sh\nbash push-ubuntu-plucky.sh\n" + commands: | + mkdir artifacts + apt update -y + apt install -y pkg-config git + cd Packaging/Linux + bash build-ubuntu-jammy.sh + bash push-ubuntu-jammy.sh + apt update -y + apt install -y crosslang + cd ../CPKG + bash pack_and_publish.sh envVars: - name: GITEA_AUTH value: '@secret:GITEA_AUTH@' + - name: CPKG_KEY + value: '@secret:CPKG_KEY@' useTTY: true condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL triggers: diff --git a/Packaging/CPKG/pack.tcross b/Packaging/CPKG/pack.tcross index 0db3e7d..2691568 100644 --- a/Packaging/CPKG/pack.tcross +++ b/Packaging/CPKG/pack.tcross @@ -42,10 +42,7 @@ var statics = [ } ]; -var winStatics = [ - "x64", - "x86" -]; + func CPUS() { var p = Process.Start({ @@ -85,24 +82,7 @@ func BuildConsoleOrServerWindowsStatic(arch) p.Join(); - mvFile(build_dir/"crossapp", publish_dir / "crossapp"); - var info = { - type = "archive", - maintainer = "Mike Nolan", - repo = "https://onedev.site.tesses.net/crosslang", - homepage = "https://crosslang.tesseslanguage.com/", - executable_name = "crossapp.exe", - executable_can_be_renamed = true, - executable_runtime = $"win-{arch}", - description = $"Runtime files for win-{arch}", - }; - var name = $"Tesses.CrossLang.Runtime.win-{arch}"; - - var subDir = new SubdirFilesystem(FS.Local,publish_dir); - var pkgStrm = FS.Local.OpenFile("publish"/$"{name}-{VERSION}.crvm","wb"); - FS.CreateArchive(subDir,pkgStrm, name ,VERSION, Json.Encode(info)); - pkgStrm.Close(); } func BuildConsoleOrServerLinuxStatic(dir,cmake_toolchain) { @@ -245,9 +225,29 @@ func mvFile(src,dest) func main(args) { Console.WriteLine($"Got {nproc} cpus"); - each(var static : winStatics) + each(var arch : ["x86","x64"]) { - BuildConsoleOrServerWindowsStatic(static); + var build_dir = "builds" / $"win-{arch}"; + var publish_dir = "publish" / $"win-{arch}"; + FS.Local.CreateDirectory(publish_dir); + mvFile(build_dir/"crossapp.exe", publish_dir / "crossapp.exe"); + var info = { + type = "archive", + maintainer = "Mike Nolan", + repo = "https://onedev.site.tesses.net/crosslang", + homepage = "https://crosslang.tesseslanguage.com/", + executable_name = "crossapp.exe", + executable_can_be_renamed = true, + executable_runtime = $"win-{arch}", + description = $"Runtime files for win-{arch}", + }; + + var name = $"Tesses.CrossLang.Runtime.win-{arch}"; + + var subDir = new SubdirFilesystem(FS.Local,publish_dir); + var pkgStrm = FS.Local.OpenFile("publish"/$"{name}-{VERSION}.crvm","wb"); + FS.CreateArchive(subDir,pkgStrm, name ,VERSION, Json.Encode(info)); + pkgStrm.Close(); } BuildConsoleOrServerLinuxShared("x86_64");