Skip to content

Commit

Permalink
Add GitHub actions and improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Richardds committed Sep 4, 2022
1 parent ee723a2 commit 5ea1eb1
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 4 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Release

on:
push:
tags:
- '*'

jobs:
release:
runs-on: ubuntu-latest
steps:
-
name: Checkout repository
uses: actions/checkout@v3
-
name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake libglew-dev libglfw3-dev
-
name: Build artifacts
run: |
mkdir build-release
cmake -D CMAKE_BUILD_TYPE=Release -B build-release
cmake --build build-release -- -j $(($(nproc) * 3 / 4))
-
name: Create release
id: create_release
uses: actions/create-release@v1
with:
draft: false
prerelease: false
release_name: ${{ github.ref }}
tag_name: ${{ github.ref }}
env:
GITHUB_TOKEN: ${{ github.token }}
-
name: Upload artifacts
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build-release/Mandelbrot
asset_name: Mandelbrot
asset_content_type: application/octet-stream
env:
GITHUB_TOKEN: ${{ github.token }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.vs
.idea
cmake-build-*
build
build-*
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ cmake_minimum_required(VERSION 3.16)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED YES)
set(CMAKE_CXX_EXTENSIONS YES)
set(CMAKE_CXX_EXTENSIONS NO)

project(Mandelbrot VERSION 0.0.1
DESCRIPTION "OpenGL Mandelbrot example"
DESCRIPTION "OpenGL Mandelbrot demo"
LANGUAGES CXX)

find_package(OpenGL REQUIRED)
Expand Down
2 changes: 1 addition & 1 deletion LICENCE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2020,2022 Richard Boldiš
Copyright 2020-2022 Richard Boldiš

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,33 @@
- `1` - Point of interest 1
- `2` - Point of interest 2
- `Esc` - Exit

## Build

### Dependencies

Ubuntu
```shell
apt install build-essential cmake libglew-dev libglfw3-dev
```

Archlinux
```shell
# Wayland
yay -S glew glfw-wayland

# X11
yay -S glew glfw-x11
```

### Bootstrap
```shell
mkdir build
cd build
cmake ..
```

### Compile
```shell
cmake --build . -- -j $(($(nproc) * 3 / 4))
```

0 comments on commit 5ea1eb1

Please sign in to comment.