Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix old #2031

Draft
wants to merge 21 commits into
base: master
Choose a base branch
from
1 change: 1 addition & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
task:
name: freebsd amd64
skip: "!changesInclude('.cirrus.yml', 'src/*')"
freebsd_instance:
image_family: freebsd-13-1

Expand Down
98 changes: 60 additions & 38 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,68 +122,85 @@ jobs:
fail-fast: false
matrix:
config:
- os: ubuntu-20.04
- os: ubuntu:18.04
ajtribick marked this conversation as resolved.
Show resolved Hide resolved
avif: OFF # Not supported on Ubuntu20.04
gles: ON
gtk3: ON
minaudio: ON
wayland: ON
minaudio: OFF
wayland: OFF
icu: ON
qt6: OFF
- os: ubuntu-22.04
cspice: OFF
- os: ubuntu:latest
avif: ON
gles: ON
gtk3: ON
minaudio: ON
wayland: ON
icu: ON
qt6: ON
cspice: ON
analysis_artifacts: 1

runs-on: ${{matrix.config.os}}
runs-on: ubuntu-latest
container:
image: "${{matrix.config.os}}"
steps:
- name: 'Install dependencies'
run: |
sudo apt-get update
sudo apt-get install -y libeigen3-dev \
libepoxy-dev \
libavcodec-dev \
libavformat-dev \
libavutil-dev \
libswscale-dev \
libjpeg-dev \
libpng-dev \
libglu1-mesa-dev \
libgtk-3-dev \
libfreetype6-dev \
libsdl2-dev \
libluajit-5.1-dev \
libfmt-dev \
libicu-dev \
libwayland-dev \
wayland-protocols \
gettext \
gperf \
ninja-build \
qtbase5-dev qtbase5-dev-tools qtbase5-private-dev
apt-get update
apt-get install -y libeigen3-dev \
libepoxy-dev \
libavcodec-dev \
libavformat-dev \
libavutil-dev \
libswscale-dev \
libjpeg-dev \
libpng-dev \
libglu1-mesa-dev \
libgtk-3-dev \
libfreetype6-dev \
libsdl2-dev \
libluajit-5.1-dev \
libfmt-dev \
libicu-dev \
libwayland-dev \
wayland-protocols \
gettext \
gperf \
ninja-build \
qtbase5-dev \
qtbase5-dev-tools \
qtbase5-private-dev \
git \
cmake \
ninja-build \
g++ \
zip
if [ "${{matrix.config.qt6}}" = "ON" ]; then
sudo apt-get install -y qt6-base-dev qt6-base-dev-tools libqt6core5compat6-dev qt6-base-private-dev
apt-get install -y qt6-base-dev \
qt6-base-dev-tools \
libqt6core5compat6-dev \
qt6-base-private-dev
fi
if [ "${{matrix.config.avif}}" = "ON" ]; then
sudo apt-get install -y libavif-dev
apt-get install -y libavif-dev
fi

- name: 'Checkout source code'
uses: actions/checkout@v3
with:
submodules: true
run: |
git config --global --add safe.directory $(pwd)
git clone --depth=1 --recurse-submodules -j2 https://github.com/CelestiaProject/Celestia.git .
git checkout "$GITHUB_REF"

- name: 'Configure CMake'
working-directory: /__w/Celestia/Celestia
run: |
cmake -B ${{github.workspace}}/build \
-G Ninja \
mkdir build
cd build
cmake -G Ninja \
-DENABLE_GLES=${{matrix.config.gles}} \
-DENABLE_SPICE=ON \
-DENABLE_SPICE=${{matrix.config.cspice}} \
-DENABLE_TOOLS=OFF \
-DENABLE_TESTS=ON \
-DENABLE_SDL=ON \
Expand All @@ -195,18 +212,21 @@ jobs:
-DENABLE_FFMPEG=ON \
-DENABLE_LIBAVIF=${{matrix.config.avif}} \
-DENABLE_MINIAUDIO=${{matrix.config.minaudio}} \
-DUSE_ICU=${{matrix.config.icu}}
-DUSE_ICU=${{matrix.config.icu}} \
..

- name: Build
working-directory: ${{github.workspace}}/build
working-directory: /__w/Celestia/Celestia/build
run: ninja

- name: Test
working-directory: ${{github.workspace}}/build
working-directory: /__w/Celestia/Celestia/build
run: ctest

- name: 'Package autogenerated headers'
if: ${{ success() && matrix.config.analysis_artifacts }}
working-directory: /__w/Celestia/Celestia
shell: bash
run: |
shopt -s globstar
zip celestia-autogenerated-headers \
Expand All @@ -215,7 +235,9 @@ jobs:

- name: 'Write PR details'
if: ${{ success() && github.event_name == 'pull_request' && matrix.config.analysis_artifacts }}
working-directory: /__w/Celestia/Celestia
run: |
printenv
echo "PR_KEY=${{ github.event.number }}" > pr-details.txt
echo "PR_BRANCH=${{ github.event.pull_request.head.ref }}" >> pr-details.txt
echo "PR_BASE=${{ github.event.pull_request.base.ref }}" >> pr-details.txt
Expand Down
3 changes: 2 additions & 1 deletion src/celestia/celestiacore.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <celengine/viewporteffect.h>
#include <celimage/pixelformat.h>
#include <celutil/tee.h>
#include "configfile.h"
#include "favorites.h"
#include "destination.h"
#include "hud.h"
Expand Down Expand Up @@ -402,7 +403,7 @@ class CelestiaCore // : public Watchable<CelestiaCore>
bool initLuaHook(ProgressNotifier*);
#endif // CELX

std::unique_ptr<CelestiaConfig> config{ nullptr };
std::unique_ptr<CelestiaConfig> config;

Universe* universe{ nullptr };

Expand Down
2 changes: 1 addition & 1 deletion src/celestia/loadstars.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

#include "loadstars.h"

#include <filesystem>
#include <fstream>

#include <celcompat/filesystem.h>
#include <celengine/stardb.h>
#include <celestia/catalogloader.h>
#include <celestia/configfile.h>
Expand Down
Loading