Skip to content

Some performance optimizations + fix page up and page down with line-… #2

Some performance optimizations + fix page up and page down with line-…

Some performance optimizations + fix page up and page down with line-… #2

Workflow file for this run

name: Build Nightly
on:
push:
branches:
- 'develop'
workflow_dispatch:
permissions: write-all
jobs:
release:
name: Create Nightly Release
runs-on: ubuntu-22.04
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
version: ${{ steps.tag.outputs.version }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
with: { fetch-depth: 0, submodules: 'recursive' }
- name: Set Tag
id: tag
run: |
echo "version=nightly" >> "$GITHUB_OUTPUT"
- name: Update Tag
uses: richardsimko/update-tag@v1
with:
tag_name: ${{ steps.tag.outputs.version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.tag.outputs.version }}
name: ecode ${{ steps.tag.outputs.version }}
draft: false
prerelease: true
generate_release_notes: true
body: >
Builds that include most recent changes as they happen. For stable releases check the whole list of [releases](https://github.com/SpartanJ/ecode/releases).
build_linux:
name: Linux
needs: release
strategy:
matrix:
config:
- compiler: default
arch: x86_64
container: ubuntu-22.04
- compiler: gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
arch: aarch64
container: ubuntu-22.04
runs-on: ${{ matrix.config.container }}
env:
CC: gcc
CXX: g++
steps:
- name: Checkout Code
uses: actions/checkout@v4
with: { fetch-depth: 0, submodules: 'recursive' }
- name: Set Environment Variables
run: |
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
echo "/usr/lib/ccache" >> "$GITHUB_PATH"
echo "INSTALL_REF=${{ needs.release.outputs.version }}" >> "$GITHUB_ENV"
if [[ $(uname -m) != ${{ matrix.config.arch }} ]]; then
echo "CC=aarch64-linux-gnu-gcc" >> "$GITHUB_ENV"
echo "CXX=aarch64-linux-gnu-g++" >> "$GITHUB_ENV"
echo "RARCH=arm64" >> "$GITHUB_ENV"
else
echo "RARCH=$(uname -m)" >> "$GITHUB_ENV"
fi
- name: Update Packages
run: |
if [[ $(uname -m) = ${{ matrix.config.arch }} ]]; then
sudo add-apt-repository -y universe
sudo add-apt-repository -y multiverse
sudo apt-get update
else
url="http://ports.ubuntu.com/ubuntu-ports"
repos="main restricted universe multiverse"
echo "deb [arch=arm64] $url jammy $repos" > arm64.list
echo "deb [arch=arm64] $url jammy-updates $repos" >> arm64.list
echo "deb [arch=arm64] $url jammy-security $repos" >> arm64.list
echo "deb [arch=arm64] $url jammy-backports $repos" >> arm64.list
sudo mv arm64.list /etc/apt/sources.list.d/
sudo apt-get update
sudo dpkg --add-architecture arm64
fi
- name: Install dependencies
run: |
sudo apt-get install -y ccache premake4 libfuse2 fuse
if [[ $(uname -m) = "x86_64" ]]; then
sudo apt-get install -y mingw-w64
wget https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-linux.tar.gz
tar xvzf premake-5.0.0-beta2-linux.tar.gz
fi
if [[ $(uname -m) = ${{ matrix.config.arch }} ]]; then
sudo apt install -y gcc-12 g++-12 libsdl2-2.0-0 libsdl2-dev
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 10
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 10
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30
sudo update-alternatives --set cc /usr/bin/gcc
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30
sudo update-alternatives --set c++ /usr/bin/g++
sudo update-alternatives --config gcc
sudo update-alternatives --config g++
else
sudo apt-get install -y libsdl2-dev:arm64 libsdl2-2.0-0:arm64
fi
- name: Install Cross Compiler
if: ${{ matrix.config.compiler != 'default' }}
run: sudo apt-get install -y ${{ matrix.config.compiler }}
- name: Build ecode
run: |
bash projects/linux/ecode/build.app.sh --version ${{ env.INSTALL_REF }} --arch ${{ matrix.config.arch }}
if [[ $(uname -m) = "x86_64" ]]; then
bash projects/mingw32/ecode/build.app.sh --version ${{ env.INSTALL_REF }}
fi
- name: Upload Files
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ needs.release.outputs.version }}
draft: false
prerelease: true
files: |
projects/linux/ecode/ecode-linux-${{ env.INSTALL_REF }}-${{ env.RARCH }}.AppImage
projects/linux/ecode/ecode-linux-${{ env.INSTALL_REF }}-${{ env.RARCH }}.tar.gz
projects/mingw32/ecode/ecode-windows-${{ env.INSTALL_REF }}-${{ env.RARCH }}.zip