Skip to content

Commit

Permalink
Merge branch 'master' into fgh_nethub-build
Browse files Browse the repository at this point in the history
  • Loading branch information
fghalasz committed May 9, 2024
2 parents 4d58923 + de361e0 commit f6c09f9
Show file tree
Hide file tree
Showing 47 changed files with 1,454 additions and 904 deletions.
118 changes: 96 additions & 22 deletions .github/workflows/buildRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:
echo "linux=true" >> $GITHUB_OUTPUT;
echo "macos=true" >> $GITHUB_OUTPUT;
echo "windows=true" >> $GITHUB_OUTPUT;
######################################################################################

Expand All @@ -123,7 +123,7 @@ jobs:
steps:
# Checkout the actions for this repo owner
- name: Checkout Actions
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/.github
path: ./Actions_${{ github.sha }}
Expand Down Expand Up @@ -157,15 +157,15 @@ jobs:
steps:
# Checkout the actions for this repo owner
- name: Checkout Actions
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/.github
path: ./Actions_${{ github.sha }}
- run: mv ./Actions_${{ github.sha }}/actions ../actions && rm -rf ./Actions_${{ github.sha }}

# Checkout the branch
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

# Setup release tag
- name: Setup Release Tag
Expand Down Expand Up @@ -272,11 +272,11 @@ jobs:

# Checkout the branch
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

# Checkout the actions for this repo owner
- name: Checkout Actions
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/.github
path: ./Actions_${{ github.sha }}
Expand All @@ -290,13 +290,13 @@ jobs:
# Uninstall exisitng X11 stuff preconfigured on runner then install correct X11 dependencies
- name: Unistall X components already on the runner
run: |
brew uninstall --ignore-dependencies libxft
brew uninstall --ignore-dependencies libxrender
brew uninstall --ignore-dependencies libxext
brew uninstall --ignore-dependencies libx11
brew uninstall --ignore-dependencies xorgproto
brew uninstall --ignore-dependencies libxdmcp
brew uninstall --ignore-dependencies libxau
brew uninstall --ignore-dependencies --force libxft
brew uninstall --ignore-dependencies --force libxrender
brew uninstall --ignore-dependencies --force libxext
brew uninstall --ignore-dependencies --force libx11
brew uninstall --ignore-dependencies --force xorgproto
brew uninstall --ignore-dependencies --force libxdmcp
brew uninstall --ignore-dependencies --force libxau
- name: Install X11 dependencies on MacOS
env:
Expand Down Expand Up @@ -324,7 +324,7 @@ jobs:
export LDEARCH=aarch64-apple-darwin
./makeright init
mkdir -p ../darwin.universal
exe=ldeinit
exe=ldeinit
lipo -create \
-arch arm64 ../darwin.aarch64/${exe} \
-arch x86_64 ../darwin.x86_64/${exe} \
Expand All @@ -346,7 +346,7 @@ jobs:
lipo ${exe} -output ../darwin.x86_64/${exe} -extract x86_64
lipo ${exe} -output ../darwin.aarch64/${exe} -extract arm64
cp -p ${exe} ../darwin.universal/${exe}
done
done
# Create release tar for github.
- name: Make release tar(s)
Expand All @@ -369,7 +369,7 @@ jobs:
# Push Release
- name: Push the release
uses: ncipollo/release-action@v1
with:
with:
allowUpdates: true
artifacts:
/tmp/release_tars/${{ steps.tag.outputs.release_tag }}-darwin.x86_64.tgz,
Expand All @@ -383,7 +383,7 @@ jobs:

# Windows: build for Windows-Cygwin via Docker build and use results to
# create and push release assets to github

windows:

needs: [inputs, sentry]
Expand Down Expand Up @@ -418,21 +418,21 @@ jobs:
# Retrieve SDL2 and install in cygwin
- name: Install SDL2
id: sdl2
env:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release download 2.26.5 --repo interlisp/cygwin-sdl --pattern *.tgz --output .\cygwin\sdl2.tar.gz
cygwin\bin\bash -login -c 'cd /; tar xzf sdl2.tar.gz'
# Checkout the branch
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: cygwin\maiko

# Checkout the actions for this repo owner
- name: Checkout Actions
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/.github
path: ./Actions_${{ github.sha }}
Expand Down Expand Up @@ -473,6 +473,80 @@ jobs:



######################################################################################

# Emscripten: build and push Maiko compiled for Emscripten (to run Maiko in browser)

emscripten:

needs: [inputs, sentry]
if: |
needs.inputs.outputs.linux == 'true'
&& (
needs.sentry.outputs.release_not_built == 'true'
|| needs.inputs.outputs.force == 'true'
)
runs-on: ubuntu-latest

steps:

# Checkout the actions for this repo owner
- name: Checkout Actions
uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/.github
path: ./Actions_${{ github.sha }}
- run: mv ./Actions_${{ github.sha }}/actions ../actions && rm -rf ./Actions_${{ github.sha }}

# Install SDL2
- name: Install SDL2
run: |
export DEBIAN_FRONTEND=noninteractive
sudo -E apt-get install -y libsdl2-dev libsdl2-2.0-0
# Install Emscripten SDK
- name: Install Empscripten
working-directory: ../
run: |
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install latest
./emsdk activate latest
CWD="$(pwd)"
echo "${CWD}" >> ${GITHUB_PATH}
echo "${CWD}/upstream/emscripten" >> ${GITHUB_PATH}
echo "${CWD}/upstream/emscripten/tools" >> ${GITHUB_PATH}
echo "${CWD}/node/$(ls -d node/*64bit | tail -1)/bin" >> ${GITHUB_PATH}
# Checkout the maiko branch
- name: Checkout
uses: actions/checkout@v4

# Setup release tag
- name: Setup Release Tag
id: tag
uses: ./../actions/release-tag-action

# Compile maiko using Emscripten (no load build)
- name: Compile Maiko using Emscripten
working-directory: ./bin
run: |
./makeright wasm_nl
cd ../emscripten.wasm_nl
tar -c -z -f ../${{ steps.tag.outputs.release_tag }}-emscripten.tgz *
# Push Release to github
- name: Push the release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: ${{ steps.tag.outputs.release_tag }}-emscripten.tgz
tag: ${{ steps.tag.outputs.release_tag }}
draft: ${{ needs.inputs.outputs.draft }}
token: ${{ secrets.GITHUB_TOKEN }}


######################################################################################

# Use set-sentry-action to determine set the sentry that says this release has
Expand All @@ -485,12 +559,12 @@ jobs:
outputs:
build_successful: ${{ steps.output.outputs.build_successful }}

needs: [inputs, sentry, linux, macos, windows]
needs: [inputs, sentry, linux, macos, windows, emscripten]

steps:
# Checkout the actions for this repo owner
- name: Checkout Actions
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/.github
path: ./Actions_${{ github.sha }}
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ cmake-build-*/**
*.x86_64-x/**
*.x86_64-sdl/**
*.x86_64/**
*.wasm/**
*.wasm-wasm/**
*.wasm_nl/**
*.wasm_nl-wasm_nl/**
*.armv7l-x/**
*.armv7l/**
*.aarch64-x/**
Expand Down
Loading

0 comments on commit f6c09f9

Please sign in to comment.