-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enable mac build again for troubleshooting
- Loading branch information
Your Name
committed
Nov 20, 2024
1 parent
1ca0264
commit a167b47
Showing
5 changed files
with
126 additions
and
10 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -4,23 +4,20 @@ on: | |
push: | ||
tags: | ||
- 'v*' | ||
branches: | ||
- 'alt-build' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
build-linux-macos: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] #, macos-latest] | ||
os: [ubuntu-latest, macos-latest] | ||
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: melusina-org/setup-macports@v1 | ||
if: startsWith(matrix.os, 'macos') | ||
with: | ||
macports-version: 2.7.1 | ||
|
||
- name: Get XPlane SDK | ||
shell: bash | ||
run: | | ||
|
@@ -29,6 +26,11 @@ jobs: | |
unzip XPSDK${SDK_VERSION}.zip | ||
mv SDK ../ | ||
- uses: melusina-org/setup-macports@v1 | ||
if: startsWith(matrix.os, 'macos') | ||
with: | ||
macports-version: 2.7.1 | ||
|
||
- name: Build Executable | ||
shell: bash | ||
env: | ||
|
@@ -38,6 +40,7 @@ jobs: | |
sudo apt-get -y install libopenal1 libopenal-dev | ||
make -f Makefile.lin64 | ||
else | ||
port selfupdate | ||
port install expat +universal | ||
make -f Makefile.mac64 | ||
fi | ||
|
@@ -51,9 +54,8 @@ jobs: | |
path: | | ||
binary.tar | ||
release: | ||
build-windows: | ||
runs-on: windows-latest | ||
needs: build | ||
|
||
steps: | ||
- uses: msys2/setup-msys2@v2 | ||
|
@@ -86,6 +88,27 @@ jobs: | |
run: | | ||
pwd | ||
make -f Makefile.mgw64 OPENAL=./libOpenAL32-main | ||
tar cvf binary.tar openSAM-pkg*/openSAM/*_x64 | ||
- name: Upload Build Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: build-windows | ||
path: | | ||
binary.tar | ||
release: | ||
runs-on: ubuntu-latest | ||
needs: [build-linux-macos, build-windows] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: setup crc32 tool | ||
shell: bash | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libarchive-zip-perl | ||
- name: Download Build Artifacts | ||
uses: actions/download-artifact@v4 | ||
|
@@ -110,10 +133,96 @@ jobs: | |
ls -l | ||
for z in openSAM*.zip; do unzip -t $z; done | ||
- name: Prepare Skunkcrafts Updater | ||
shell: bash | ||
run: | | ||
# at this point version.mak should have the version number | ||
source version.mak | ||
for XP_VERSION in XP11 XP12; do | ||
OPENSAM_ARTIFACT=openSAM_${XP_VERSION}-${VERSION} | ||
OPENSAM_FOLDER=release/${XP_VERSION}/openSAM | ||
OPENSAM_LIBRARY_FOLDER=release/${XP_VERSION}/openSAM_Library | ||
mkdir -p ${OPENSAM_FOLDER} | ||
mkdir -p ${OPENSAM_FOLDER}/lua | ||
mkdir -p ${OPENSAM_LIBRARY_FOLDER} | ||
if [ $XP_VERSION == "XP11" ]; then | ||
unzip openSAM_XP11-${VERSION}.zip -d ${OPENSAM_ARTIFACT} | ||
else | ||
# normalize folder name | ||
unzip openSAM-${VERSION}.zip -d ${OPENSAM_ARTIFACT} | ||
fi | ||
echo "=============== OPEN SAM ARTIFACT ===============" | ||
rsync -av ${OPENSAM_ARTIFACT}/openSAM/ ${OPENSAM_FOLDER}/ | ||
cp -r openSAM-pkg/lua/* ${OPENSAM_FOLDER}/lua | ||
cp -r ${OPENSAM_ARTIFACT}/LICENSE ${OPENSAM_FOLDER}/LICENSE | ||
cp -r ${OPENSAM_ARTIFACT}/Credits_and_Licensing.txt ${OPENSAM_FOLDER}/Credits_and_Licensing.txt | ||
cp -r ${OPENSAM_ARTIFACT}/00_README.txt ${OPENSAM_FOLDER}/00_README.txt | ||
ls -l ${OPENSAM_FOLDER} | ||
echo | ||
echo "=============== OPEN SAM LIBRARY ARTIFACT ===============" | ||
rsync -av ${OPENSAM_ARTIFACT}/openSAM_Library/ ${OPENSAM_LIBRARY_FOLDER}/ | ||
cp -r ${OPENSAM_ARTIFACT}/LICENSE ${OPENSAM_LIBRARY_FOLDER}/LICENSE | ||
cp -r ${OPENSAM_ARTIFACT}/Credits_and_Licensing.txt ${OPENSAM_LIBRARY_FOLDER}/Credits_and_Licensing.txt | ||
cp -r ${OPENSAM_ARTIFACT}/00_README.txt ${OPENSAM_LIBRARY_FOLDER}/00_README.txt | ||
ls -l ${OPENSAM_LIBRARY_FOLDER} | ||
## skunkcrafts for openSAM_Library | ||
sed -e "s|@FOLDER_NAME@|${OPENSAM_LIBRARY_FOLDER}|g" \ | ||
-e "s|@XP_VERSION@|${XP_VERSION}|g" \ | ||
-e "s|@VERSION@|${VERSION}|g" \ | ||
-e "s|@NAME@|Library|g" \ | ||
skunkcrafts_updater.cfg.template > "${OPENSAM_LIBRARY_FOLDER}/skunkcrafts_updater.cfg" | ||
## skunkcrafts for openSAM | ||
sed -e "s|@FOLDER_NAME@|${OPENSAM_FOLDER}|g" \ | ||
-e "s|@XP_VERSION@|${XP_VERSION}|g" \ | ||
-e "s|@VERSION@|${VERSION}|g" \ | ||
-e "s|@NAME@||g" \ | ||
skunkcrafts_updater.cfg.template > "${OPENSAM_FOLDER}/skunkcrafts_updater.cfg" | ||
find ${OPENSAM_FOLDER}/ -type f ! \( -name '*skunkcrafts_updater*' -o -path '*skunkcrafts_updater*' \) -print0 | while IFS= read -r -d '' file; do | ||
checksum_hex=$(crc32 "$file") | ||
# Convert hex checksum to uint32 decimal | ||
checksum_decimal=$((16#$checksum_hex)) | ||
# Remove "release/" prefix from $file | ||
modified_file="${file#${OPENSAM_FOLDER}/}" | ||
echo "$modified_file|$checksum_decimal" >> ${OPENSAM_FOLDER}/skunkcrafts_updater_whitelist.txt | ||
done | ||
find ${OPENSAM_LIBRARY_FOLDER}/ -type f ! \( -name '*skunkcrafts_updater*' -o -path '*skunkcrafts_updater*' \) -print0 | while IFS= read -r -d '' file; do | ||
checksum_hex=$(crc32 "$file") | ||
# Convert hex checksum to uint32 decimal | ||
checksum_decimal=$((16#$checksum_hex)) | ||
# Remove "release/" prefix from $file | ||
modified_file="${file#${OPENSAM_LIBRARY_FOLDER}/}" | ||
echo "$modified_file|$checksum_decimal" >> ${OPENSAM_LIBRARY_FOLDER}/skunkcrafts_updater_whitelist.txt | ||
done | ||
touch ${OPENSAM_FOLDER}/skunkcrafts_updater_blacklist.txt | ||
touch ${OPENSAM_LIBRARY_FOLDER}/skunkcrafts_updater_blacklist.txt | ||
done | ||
# push to release branch | ||
git checkout -b release | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "GH Release" | ||
git add release/ | ||
git commit -m "Release ${VERSION}" | ||
git push -f -u origin release | ||
- name: Create Release | ||
id: create_release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: ${{ github.ref }} | ||
files: | | ||
${{ github.workspace }}/openSAM*.zip | ||
prerelease: ${{ contains(github.ref_name, '-') }} |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/openSAM-pkg_XP11/ | ||
/OBJ_*/ | ||
*.xpl | ||
# *.xpl | ||
/*.zip | ||
|
||
# Prerequisites | ||
|
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,7 @@ | ||
zone|custom | ||
liveries|false | ||
module|https://raw.githubusercontent.com/hotbso/openSAM/refs/heads/release/@FOLDER_NAME@/ | ||
version|@VERSION@ | ||
disabled|false | ||
name|openSAM @NAME@ @XP_VERSION@ | ||
locked|false |
Empty file.