-
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
public release CI should now be functional on all 3 major platforms (f…
…ixes #1)
- Loading branch information
Showing
10 changed files
with
173 additions
and
19 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
name: release | ||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
mac_build: | ||
runs-on: macos-14 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: build | ||
run: | | ||
brew install scons | ||
cp build/build_macos.sh . | ||
sudo chmod +x build_macos.sh | ||
./build_macos.sh ci | ||
cd release | ||
tar -czf ../mac_release.tar.gz * | ||
cd .. | ||
curl -u "${{secrets.CIFTP}}" -s -T mac_release.tar.gz ftp://nvgt.gg | ||
linux_build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: build | ||
run: | | ||
sudo chmod +x build/build_linux.sh | ||
./build/build_linux.sh ci | ||
cd release | ||
tar -czf ../linux_release.tar.gz * | ||
cd .. | ||
curl -u "${{secrets.CIFTP}}" -s -T linux_release.tar.gz ftp://nvgt.gg | ||
windows_build: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: build | ||
run: | | ||
pip3 install scons | ||
choco install -y upx | ||
curl -s -O https://nvgt.gg/windev.zip | ||
7z x windev.zip -owindev | ||
scons -s | ||
cd release | ||
tar -czf ../windows_release.tar.gz * | ||
cd .. | ||
curl -u "${{secrets.CIFTP}}" -s -T windows_release.tar.gz ftp://nvgt.gg | ||
windows_package: | ||
runs-on: windows-latest | ||
needs: ["linux_build", "mac_build", "windows_build"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: build | ||
run: | | ||
curl -s -O -u "${{secrets.CIFTP}}" ftp://nvgt.gg/mac_release.tar.gz | ||
curl -s -O -u "${{secrets.CIFTP}}" ftp://nvgt.gg/linux_release.tar.gz | ||
curl -s -O -u "${{secrets.CIFTP}}" ftp://nvgt.gg/windows_release.tar.gz | ||
mkdir linux_release | ||
tar -xzf linux_release.tar.gz -C linux_release | ||
mkdir mac_release | ||
tar -xzf mac_release.tar.gz -C mac_release | ||
tar -xzf windows_release.tar.gz -C release | ||
cd doc | ||
pip3 install -r requirements.txt | ||
cd OSL | ||
python3 make_osl_document.py | ||
cd .. | ||
python3 docgen.py | ||
cd .. | ||
cp linux_release/stub/* release/stub | ||
cp mac_release/stub/* release/stub | ||
cd install | ||
makensis nvgt.nsi | ||
python3 upload_windows_installer.py ${{secrets.CIFTP}} | ||
mac_package: | ||
runs-on: macos-latest | ||
needs: ["linux_build", "mac_build", "windows_build"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: build | ||
run: | | ||
curl -s -O -u "${{secrets.CIFTP}}" ftp://nvgt.gg/mac_release.tar.gz | ||
curl -s -O -u "${{secrets.CIFTP}}" ftp://nvgt.gg/linux_release.tar.gz | ||
curl -s -O -u "${{secrets.CIFTP}}" ftp://nvgt.gg/windows_release.tar.gz | ||
mkdir linux_release | ||
tar -xzf linux_release.tar.gz -C linux_release | ||
mkdir windows_release | ||
tar -xzf windows_release.tar.gz -C windows_release | ||
tar -xzf mac_release.tar.gz -C release | ||
python3 build/ci_set_version.py | ||
cd doc | ||
pip3 install --user -r requirements.txt --break-system-packages | ||
cd OSL | ||
python3 make_osl_document.py | ||
cd .. | ||
python3 docgen.py | ||
cd .. | ||
cp linux_release/stub/* release/stub | ||
cp windows_release/stub/* release/stub | ||
cd install | ||
python3 make_dmg.py ../release ${{secrets.CIFTP}} | ||
final_package: | ||
runs-on: ubuntu-latest | ||
needs: ["windows_package", "mac_package"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: build | ||
run: | | ||
curl -H "X-Auth: ${{secrets.CIPHP}}" -s https://nvgt.gg/ci/release_complete.php?ver=$nvgt_version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# This just sets the nvgt_version github variable for use within CI actions to the format used for binary releases. Any of this structure subject to change. | ||
|
||
import os | ||
from pathlib import Path | ||
|
||
def get_version_info(): | ||
return Path("version").read_text().strip().replace("-", "_") | ||
|
||
with open(os.getenv("GITHUB_ENV"), "a") as f: f.write(f"nvgt_version={get_version_info()}\n") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import ftplib, os, sys | ||
from pathlib import Path | ||
|
||
def get_version_info(): | ||
return Path("../version").read_text().strip().replace("-", "_") | ||
|
||
ftp_creds=sys.argv[1].split(":") | ||
ver = get_version_info() | ||
if ftp_creds: | ||
try: | ||
ftp = ftplib.FTP("nvgt.gg", ftp_creds[0], ftp_creds[1]) | ||
f = open(f"nvgt_{ver}.exe", "rb") | ||
ftp.storbinary(f"STOR nvgt_{ver}.exe", f) | ||
f.close() | ||
ftp.quit() | ||
except Exception as e: | ||
print(f"Warning, cannot upload to ftp {e}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?php | ||
require "auth.php"; | ||
// This copies a couple of release artifacts into the downloads directory. | ||
if (!isset($_GET["ver"])) die("missing version"); | ||
echo system("cp ../../ci/nvgt_" . $_GET["ver"] . "* ../downloads"); | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
layout: default.liquid | ||
title: Downloads | ||
permalink: /downloads/index.php | ||
--- | ||
|
||
<h1>Downloads</h1> | ||
<p>This page contains the latest binary releases for NVGT. The page is not currently particularly organized but will be improved soon.</p> | ||
|
||
<h2>available files</h2> | ||
<?php | ||
$files = glob("nvgt_*"); | ||
if (count($files) < 1) { | ||
echo("<p>no files</p>"); | ||
} else { | ||
echo "<ul>\n"; | ||
foreach($files as $file) { | ||
echo '<li><a href="' . $file . '">' .$file. '</a></li>'; | ||
} | ||
echo "</ul>\n"; | ||
} | ||
?> |