-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from ElementAstro/AstroAir/add-build-script
Add build script
- Loading branch information
Showing
167 changed files
with
721 additions
and
493 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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
compiler: [gcc, clang] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up build environment | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y gcc g++ cmake libcfitsio-dev zlib1g-dev libssl-dev libzip-dev libnova-dev libfmt-dev gettext | ||
- name: Install GCC 13 and G++ 13 | ||
if: matrix.compiler == 'gcc' | ||
run: | | ||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y | ||
sudo apt-get update | ||
sudo apt-get install -y gcc-13 g++-13 | ||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 60 | ||
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 60 | ||
- name: Install Clang 18 | ||
if: matrix.compiler == 'clang' | ||
run: | | ||
sudo apt-get install -y clang-18 | ||
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-18 60 | ||
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-18 60 | ||
- name: Build project | ||
run: | | ||
mkdir build | ||
cd build | ||
cmake -DCMAKE_CXX_COMPILER=${{ matrix.compiler }}++ .. | ||
make | ||
- name: Run tests | ||
run: | | ||
cd build | ||
ctest | ||
- name: Package project | ||
run: | | ||
cd build | ||
make package |
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 |
---|---|---|
|
@@ -33,4 +33,4 @@ | |
|
||
.cache/ | ||
build/ | ||
test/ | ||
test/ |
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
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,2 +1,89 @@ | ||
# lithium-next | ||
Next Generation of Lithium | ||
|
||
## Project Description | ||
|
||
Lithium-Next is an open-source astrophotography terminal designed to provide a comprehensive solution for managing and automating astrophotography tasks. The project aims to offer a user-friendly interface, robust features, and seamless integration with various astrophotography equipment and software. | ||
|
||
### Features | ||
|
||
- Automated build process using GitHub Actions | ||
- Support for multiple compilers (GCC and Clang) | ||
- Detailed project configuration using CMake | ||
- Pre-commit hooks for code quality checks | ||
- Integration with CodeQL for code analysis | ||
- Comprehensive logging and debugging support | ||
- Modular architecture for easy extension and customization | ||
|
||
## GitHub Actions Workflows | ||
|
||
### Build Workflow | ||
|
||
The `build.yml` workflow automates the build process for the project. It includes steps for checking out the repository, setting up the build environment, building the project, running tests, and packaging the project. | ||
|
||
#### Triggering the Workflow | ||
|
||
The `build.yml` workflow is triggered on push and pull request events to the `master` branch. This ensures that the project is built, tested, and packaged automatically on every push and pull request to the `master` branch. | ||
|
||
## Development Environment Setup | ||
|
||
To set up the development environment for Lithium-Next, follow these steps: | ||
|
||
1. Clone the repository: | ||
```bash | ||
git clone https://github.com/ElementAstro/lithium-next.git | ||
cd lithium-next | ||
``` | ||
|
||
2. Install the required dependencies: | ||
```bash | ||
sudo apt-get update | ||
sudo apt-get install -y gcc g++ cmake libcfitsio-dev zlib1g-dev libssl-dev libzip-dev libnova-dev libfmt-dev gettext | ||
``` | ||
|
||
3. Set up the pre-commit hooks: | ||
```bash | ||
pre-commit install | ||
``` | ||
|
||
4. Build the project: | ||
```bash | ||
mkdir build | ||
cd build | ||
cmake .. | ||
make | ||
``` | ||
|
||
5. Run the tests: | ||
```bash | ||
ctest | ||
``` | ||
|
||
6. Package the project: | ||
```bash | ||
make package | ||
``` | ||
|
||
7. To build with Clang, ensure Clang 18 or higher is installed and set the compiler: | ||
```bash | ||
sudo apt-get install -y clang-18 | ||
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-18 60 | ||
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-18 60 | ||
mkdir build-clang | ||
cd build-clang | ||
cmake -DCMAKE_CXX_COMPILER=clang++ .. | ||
make | ||
``` | ||
|
||
8. To build with GCC 13, ensure GCC 13 is installed and set the compiler: | ||
```bash | ||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y | ||
sudo apt-get update | ||
sudo apt-get install -y gcc-13 g++-13 | ||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 60 | ||
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 60 | ||
mkdir build-gcc | ||
cd build-gcc | ||
cmake -DCMAKE_CXX_COMPILER=g++ .. | ||
make | ||
``` |
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
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 |
---|---|---|
|
@@ -6,4 +6,4 @@ if(POLICY CMP0043) | |
endif() | ||
if(POLICY CMP0148) | ||
cmake_policy(SET CMP0148 NEW) | ||
endif() | ||
endif() |
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 |
---|---|---|
|
@@ -79,4 +79,4 @@ | |
"searchCommand": "winget search {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
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 |
---|---|---|
|
@@ -72,4 +72,4 @@ int main() { | |
} | ||
|
||
return 0; | ||
} | ||
} |
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 |
---|---|---|
|
@@ -83,4 +83,4 @@ int main() { | |
} | ||
|
||
return 0; | ||
} | ||
} |
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 |
---|---|---|
|
@@ -120,4 +120,4 @@ int main() { | |
} | ||
|
||
return 0; | ||
} | ||
} |
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
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
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 |
---|---|---|
|
@@ -90,4 +90,4 @@ int main() { | |
std::cerr << "Error occurred: " << e.what() << std::endl; | ||
return -1; | ||
} | ||
} | ||
} |
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 |
---|---|---|
|
@@ -122,4 +122,4 @@ auto base64Decode(std::string const& encoded_string) -> std::string { | |
} | ||
|
||
return result; | ||
} | ||
} |
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.