CHANGELOG #11427
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
on: [push, pull_request] | |
name: CI | |
permissions: {} | |
jobs: | |
"Package_Source": | |
permissions: | |
contents: read # to fetch code (actions/checkout) | |
runs-on: ubuntu-latest | |
container: | |
image: "ghcr.io/naev/naev-release:latest" | |
steps: | |
- name: Checkout Naev Repository | |
uses: actions/checkout@v3 | |
with: | |
path: source | |
fetch-depth: 0 | |
submodules: true | |
- name: Package Dist | |
run: | | |
meson setup build source -Dexecutable=disabled -Ddocs_c=disabled -Ddocs_lua=disabled | |
meson dist -C build --no-tests --include-subprojects | |
- name: Upload Dist Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: naev-dist-${{ github.sha }} | |
path: ${{ github.workspace }}/build/meson-dist/* | |
"Linux_Compile_Naev": | |
needs: "Package_Source" | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- image: naev-steamruntime | |
config: linux_steamruntime.ini | |
wrap_mode: default | |
runs-on: ubuntu-latest | |
container: | |
image: "ghcr.io/naev/${{ matrix.image }}:latest" | |
volumes: | |
- ${{ github.workspace }}:${{ github.workspace }} | |
steps: | |
- name: Get Source | |
uses: actions/download-artifact@v1 | |
with: | |
name: naev-dist-${{ github.sha }} | |
- name: Extract Source | |
run: | | |
mkdir source | |
tar -xf naev-dist-${{ github.sha }}/naev-*.tar.xz -C source --strip 1 | |
- name: Meson Setup | |
id: setup | |
run: | | |
meson setup build source \ | |
--native-file='source/utils/build/${{ matrix.config }}' \ | |
--buildtype=debug \ | |
--wrap-mode=${{ matrix.wrap_mode }} \ | |
--force-fallback-for=sdl2_image,glpk,SuiteSparse \ | |
-Dsteamruntime=false \ | |
-Dprefix="/usr" \ | |
-Db_lto=true \ | |
-Dinstaller=false \ | |
-Db_lto=true \ | |
-Dauto_features=enabled \ | |
-Ddocs_c=disabled \ | |
-Ddocs_lua=disabled | |
- name: Upload Setup Log | |
uses: actions/upload-artifact@v1 | |
if: ${{ success() || steps.setup.outcome == 'failure' }} | |
with: | |
name: ${{ matrix.image }}-${{ github.sha }}-setup-log | |
path: ${{ github.workspace }}/build/meson-logs/meson-log.txt | |
- name: Meson Compile | |
id: compile | |
run: | | |
meson compile -C build | |
- name: Upload Compile Log | |
uses: actions/upload-artifact@v1 | |
if: ${{ success() || steps.compile.outcome == 'failure' }} | |
with: | |
name: ${{ matrix.image }}-${{ github.sha }}-compile-log | |
path: ${{ github.workspace }}/build/meson-logs/meson-log.txt | |
- name: Upload Build Artifacts | |
uses: actions/upload-artifact@v1 | |
with: | |
name: ${{ matrix.image }}-${{ github.sha }}-buildArtifacts | |
path: ${{ github.workspace }}/build | |
- name: Test Install | |
id: install | |
run: | | |
meson install -C build | |
env: | |
DESTDIR: "${{ github.workspace }}/staging" | |
- name: Upload Install Log | |
uses: actions/upload-artifact@v1 | |
if: ${{ success() || steps.install.outcome == 'failure' }} | |
with: | |
name: ${{ matrix.image }}-${{ github.sha }}-install-log | |
path: ${{ github.workspace }}/build/meson-logs/meson-log.txt | |
- name: Compile AppImage | |
id: appimageCompile | |
run: | | |
if [[ "$IMAGE_NAME" =~ "naev-steamfrankenruntime" ]]; then | |
./source/utils/buildAppImage.sh -d -s source -b appImageBuild | tee appImageBuildLog.txt | |
ls ${{ github.workspace }}/appImageBuild/dist/AppDir >/dev/null || exit | |
else | |
./source/utils/buildAppImage.sh -d -i -s source -b appImageBuild | tee appImageBuildLog.txt | |
ls ${{ github.workspace }}/appImageBuild/dist/*.AppImage >/dev/null || exit | |
fi | |
- name: Upload AppImage Compile Log | |
uses: actions/upload-artifact@v1 | |
if: ${{ (success() || steps.appimageCompile.outcome == 'failure') }} | |
with: | |
name: ${{ matrix.image }}-${{ github.sha }}-AppImageBuild-log | |
path: ${{ github.workspace }}/appImageBuildLog.txt | |
"Windows_Compile_Naev": | |
needs: "Package_Source" | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- image: naev-windows | |
config: windows_cross_mingw.ini | |
runs-on: ubuntu-latest | |
container: | |
image: "ghcr.io/naev/${{ matrix.image }}:latest" | |
steps: | |
- name: Get Source | |
uses: actions/download-artifact@v3 | |
with: | |
name: naev-dist-${{ github.sha }} | |
- name: Extract Source | |
run: | | |
mkdir source | |
tar -xf naev-*.tar.xz -C source --strip 1 | |
- name: Meson Setup | |
id: setup | |
run: | | |
meson setup build source \ | |
--prefix="$(pwd)"/source/extras/windows/installer \ | |
--bindir=bin \ | |
-Dndata_path=bin \ | |
--cross-file='source/utils/build/${{ matrix.config }}' \ | |
--buildtype=debug \ | |
--wrap-mode=forcefallback \ | |
-Dinstaller=false \ | |
-Drelease=false \ | |
-Db_lto=true \ | |
-Dauto_features=enabled \ | |
-Ddocs_c=disabled \ | |
-Ddocs_lua=disabled | |
- name: Upload Setup Log | |
uses: actions/upload-artifact@v3 | |
if: ${{ success() || steps.setup.outcome == 'failure' }} | |
with: | |
name: ${{ matrix.image }}-${{ github.sha }}-setup-log | |
path: ${{ github.workspace }}/build/meson-logs/meson-log.txt | |
- name: Meson Compile | |
id: compile | |
run: | | |
meson compile -C build | |
- name: Upload Compile Log | |
uses: actions/upload-artifact@v3 | |
if: ${{ success() || steps.compile.outcome == 'failure' }} | |
with: | |
name: ${{ matrix.image }}-${{ github.sha }}-compile-log | |
path: ${{ github.workspace }}/build/meson-logs/meson-log.txt | |
- name: Upload Build Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.image }}-${{ github.sha }}-buildArtifacts | |
path: | | |
${{ github.workspace }}/build | |
if-no-files-found: error | |
- name: Test Install | |
id: install | |
run: | | |
meson install -C build | |
- name: Upload Install Log | |
uses: actions/upload-artifact@v3 | |
if: ${{ success() || steps.install.outcome == 'failure' }} | |
with: | |
name: ${{ matrix.image }}-${{ github.sha }}-install-log | |
path: ${{ github.workspace }}/build/meson-logs/meson-log.txt | |
"Darwin_Compile_Naev": | |
needs: "Package_Source" | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- image: naev-macos | |
arch: x86_64 | |
deploymenttarget: "10.13" | |
config: macos_cross_osxcross.ini | |
- image: naev-macos | |
arch: aarch64 | |
deploymenttarget: "12.0" | |
config: macos_aarch64_cross_osxcross.ini | |
runs-on: ubuntu-latest | |
container: | |
image: "ghcr.io/naev/${{ matrix.image }}:latest" | |
env: | |
BUILDARCH: "${{ matrix.arch }}" | |
HOST: "${{ matrix.arch }}-apple-darwin23" | |
MACOSX_DEPLOYMENT_TARGET: "${{ matrix.deploymenttarget }}" | |
steps: | |
- name: Configure Build Environment | |
run: | | |
echo "Configuring MacPorts packages and build env variables for $BUILDARCH." | |
if [[ "$BUILDARCH" == "aarch64" ]] then | |
rm -f /usr/lib/osxcross/macports | |
ln -s /usr/lib/osxcross/macports.aarch64 /usr/lib/osxcross/macports | |
elif [[ "$BUILDARCH" == "x86_64" ]] then | |
rm -f /usr/lib/osxcross/macports | |
ln -s /usr/lib/osxcross/macports.x86_64 /usr/lib/osxcross/macports | |
# Fallback | |
else | |
rm -f /usr/lib/osxcross/macports | |
ln -s /usr/lib/osxcross/macports.x86_64 /usr/lib/osxcross/macports | |
fi | |
- name: Get Source | |
uses: actions/download-artifact@v3 | |
with: | |
name: naev-dist-${{ github.sha }} | |
- name: Extract Source | |
run: | | |
mkdir source | |
tar -xf naev-*.tar.xz -C source --strip 1 | |
- name: Meson Setup | |
id: setup | |
run: | | |
meson setup build source \ | |
--prefix="$(pwd)"/build/dist/Naev.app \ | |
--bindir=Contents/MacOS \ | |
-Dndata_path=Contents/Resources \ | |
--cross-file='source/utils/build/${{ matrix.config }}' \ | |
--buildtype=debug \ | |
-Dinstaller=false \ | |
-Drelease=false \ | |
-Db_lto=true \ | |
-Dauto_features=enabled \ | |
-Ddocs_c=disabled \ | |
-Ddocs_lua=disabled | |
- name: Upload Setup Log | |
uses: actions/upload-artifact@v3 | |
if: ${{ success() || steps.setup.outcome == 'failure' }} | |
with: | |
name: ${{ matrix.image }}.${{ matrix.arch }}-${{ github.sha }}-setup-log | |
path: ${{ github.workspace }}/build/meson-logs/meson-log.txt | |
- name: Meson Compile | |
id: compile | |
run: | | |
meson compile -C build | |
- name: Upload Compile Log | |
uses: actions/upload-artifact@v3 | |
if: ${{ success() || steps.compile.outcome == 'failure' }} | |
with: | |
name: ${{ matrix.image }}.${{ matrix.arch }}-${{ github.sha }}-compile-log | |
path: ${{ github.workspace }}/build/meson-logs/meson-log.txt | |
- name: Upload Build Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.image }}.${{ matrix.arch }}-${{ github.sha }}-buildArtifacts | |
path: | | |
${{ github.workspace }}/build | |
if-no-files-found: error | |
- name: Test Install | |
id: install | |
run: | | |
meson install -C build | |
- name: Upload Install Log | |
uses: actions/upload-artifact@v3 | |
if: ${{ success() || steps.install.outcome == 'failure' }} | |
with: | |
name: ${{ matrix.image }}.${{ matrix.arch }}-${{ github.sha }}-install-log | |
path: ${{ github.workspace }}/build/meson-logs/meson-log.txt | |
"Luacheck": | |
runs-on: ubuntu-latest | |
container: | |
image: "ghcr.io/naev/naev-steamruntime:latest" | |
needs: | |
[ | |
Package_Source, | |
Linux_Compile_Naev, | |
Windows_Compile_Naev, | |
Darwin_Compile_Naev, | |
] | |
steps: | |
- name: Get Source | |
uses: actions/download-artifact@v3 | |
with: | |
name: naev-dist-${{ github.sha }} | |
- name: Extract Source | |
run: | | |
mkdir source | |
tar -xf naev-*.tar.xz -C source --strip 1 | |
- name: Meson Setup | |
id: setup | |
run: | | |
meson setup build source \ | |
--native-file='source/utils/build/linux.ini' \ | |
--buildtype=debug \ | |
--wrap-mode=forcefallback \ | |
-Dinstaller=false \ | |
-Db_lto=true \ | |
-Dauto_features=enabled \ | |
-Ddocs_c=disabled \ | |
-Ddocs_lua=disabled | |
- name: Meson Test | |
id: test | |
run: | | |
meson test luacheck -C build | |
- name: Upload Test Log | |
uses: actions/upload-artifact@v3 | |
if: ${{ success() || steps.test.outcome == 'failure' }} | |
with: | |
name: ${{ github.sha }}-lualint-testlog | |
path: ${{ github.workspace }}/build/meson-logs/testlog.txt | |
"Documentation": | |
runs-on: ubuntu-latest | |
container: | |
image: "ghcr.io/naev/naev-docs:latest" | |
needs: Luacheck | |
steps: | |
- name: Get Source | |
uses: actions/download-artifact@v3 | |
with: | |
name: naev-dist-${{ github.sha }} | |
- name: Extract Source | |
run: | | |
mkdir source | |
tar -xf naev-*.tar.xz -C source --strip 1 | |
- name: Meson Setup | |
run: | | |
meson setup build source \ | |
-Dexecutable=disabled | |
- name: Meson Compile | |
id: compile | |
run: | | |
meson compile -C build | |
- name: Upload Compile Log | |
uses: actions/upload-artifact@v3 | |
if: ${{ steps.compile.outcome == 'failure' }} | |
with: | |
name: ${{ github.sha }}-ldoc-log | |
path: ${{ github.workspace }}/build/meson-logs/meson-log.txt | |
- name: Trigger API Documentation Update | |
if: ${{ github.event_name == 'push' && github.repository == 'naev/naev' && github.ref == 'refs/heads/main' }} | |
uses: convictional/trigger-workflow-and-wait@v1.6.5 | |
with: | |
owner: naev | |
repo: naev.github.io | |
github_token: ${{ secrets.WEBSITE_ACCESS_TOKEN }} | |
workflow_file_name: website_publish.yml | |
client_payload: '{ "publish_type": "docs" }' |