📝 adjust CI
This commit is contained in:
parent
a34f90cbd1
commit
ac1960ea27
|
@ -1,4 +1,4 @@
|
||||||
name: C/C++ CI
|
name: Nasal Interpreter Build/Test/Package CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
|
@ -20,9 +20,10 @@ jobs:
|
||||||
cd module
|
cd module
|
||||||
make all -j4
|
make all -j4
|
||||||
cd ..
|
cd ..
|
||||||
make test
|
- name: test
|
||||||
tar -czf nasal-mac-nightly.tgz .
|
run: make test
|
||||||
python3 tools/pack.py
|
- name: package
|
||||||
|
run: python3 tools/pack.py
|
||||||
- name: Release file
|
- name: Release file
|
||||||
# You may pin to the exact commit or the version.
|
# You may pin to the exact commit or the version.
|
||||||
# uses: djnicholson/release-action@e9a535b3eced09c460e07a84118fb74ae9b53236
|
# uses: djnicholson/release-action@e9a535b3eced09c460e07a84118fb74ae9b53236
|
||||||
|
@ -36,7 +37,6 @@ jobs:
|
||||||
automatic_release_tag: next_macOS
|
automatic_release_tag: next_macOS
|
||||||
# File to release
|
# File to release
|
||||||
files: |
|
files: |
|
||||||
nasal-mac-nightly.tgz
|
|
||||||
nasal-Darwin.tar
|
nasal-Darwin.tar
|
||||||
|
|
||||||
linux-x86_64-build:
|
linux-x86_64-build:
|
||||||
|
@ -49,10 +49,10 @@ jobs:
|
||||||
cd module
|
cd module
|
||||||
make all -j4
|
make all -j4
|
||||||
cd ..
|
cd ..
|
||||||
make test
|
- name: test
|
||||||
touch nasal-linux-x86_64-nightly.tgz
|
run: make test
|
||||||
tar -czf nasal-linux-x86_64-nightly.tgz --exclude=nasal-linux-x86_64-nightly.tgz .
|
- name: package
|
||||||
python3 tools/pack.py
|
run: python3 tools/pack.py
|
||||||
- name: Release file
|
- name: Release file
|
||||||
# You may pin to the exact commit or the version.
|
# You may pin to the exact commit or the version.
|
||||||
# uses: djnicholson/release-action@e9a535b3eced09c460e07a84118fb74ae9b53236
|
# uses: djnicholson/release-action@e9a535b3eced09c460e07a84118fb74ae9b53236
|
||||||
|
@ -66,6 +66,5 @@ jobs:
|
||||||
automatic_release_tag: next_linux_x86_64
|
automatic_release_tag: next_linux_x86_64
|
||||||
# File to release
|
# File to release
|
||||||
files: |
|
files: |
|
||||||
nasal-linux-x86_64-nightly.tgz
|
|
||||||
nasal-Linux.tar
|
nasal-Linux.tar
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,7 @@ import os
|
||||||
import platform
|
import platform
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
|
nasal_version = "11.2"
|
||||||
nasal_version = "11.1"
|
|
||||||
|
|
||||||
build_directory = pathlib.Path("build")
|
build_directory = pathlib.Path("build")
|
||||||
if not os.path.exists(build_directory):
|
if not os.path.exists(build_directory):
|
||||||
|
@ -47,20 +46,25 @@ for m in ["libfib", "libkey", "libmat", "libnasock"]:
|
||||||
|
|
||||||
|
|
||||||
tar_file_name = "nasal-{}".format(platform.system())
|
tar_file_name = "nasal-{}".format(platform.system())
|
||||||
|
|
||||||
# create package directory in build directory and copy files needed
|
# create package directory in build directory and copy files needed
|
||||||
package_directory = build_directory.joinpath(tar_file_name)
|
package_directory = build_directory.joinpath(tar_file_name)
|
||||||
if not os.path.exists(package_directory):
|
if not os.path.exists(package_directory):
|
||||||
os.mkdir(package_directory)
|
os.mkdir(package_directory)
|
||||||
os.mkdir(package_directory.joinpath("module"))
|
os.mkdir(package_directory.joinpath("module"))
|
||||||
|
|
||||||
print("pack nasal executable")
|
print("pack nasal executable")
|
||||||
shutil.copy(nasal_executable, package_directory.joinpath(nasal_executable))
|
shutil.copy(nasal_executable, package_directory.joinpath(nasal_executable))
|
||||||
|
|
||||||
print("pack nasal standard library")
|
print("pack nasal standard library")
|
||||||
shutil.copytree(nasal_standard_library, package_directory.joinpath(nasal_standard_library))
|
shutil.copytree(nasal_standard_library, package_directory.joinpath(nasal_standard_library))
|
||||||
|
|
||||||
for m in nasal_modules:
|
for m in nasal_modules:
|
||||||
print("pack nasal module:", m)
|
print("pack nasal module:", m)
|
||||||
shutil.copy(m, package_directory.joinpath(m))
|
shutil.copy(m, package_directory.joinpath(m))
|
||||||
|
|
||||||
file = tarfile.open(name=tar_file_name + ".tar", mode="w")
|
file = tarfile.open(name=tar_file_name + ".tar", mode="w")
|
||||||
file.add(package_directory)
|
file.add(package_directory)
|
||||||
|
|
||||||
print("pack succeeded")
|
print("pack succeeded")
|
||||||
file.close()
|
file.close()
|
||||||
|
|
Loading…
Reference in New Issue