Skip to content

Commit df64056

Browse files
committed
Initial commit
1 parent 6a44fdc commit df64056

229 files changed

Lines changed: 94399 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [main, master, dev]
6+
pull_request:
7+
branches: [main, master]
8+
9+
jobs:
10+
build-linux:
11+
name: Linux (SDL2)
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Install dependencies
17+
run: |
18+
sudo apt-get update -qq
19+
sudo apt-get install -y libsdl2-dev clang gcc
20+
21+
- name: Build (debug)
22+
working-directory: src
23+
run: make sdl CC=gcc -j$(nproc)
24+
25+
- name: Build (release)
26+
working-directory: src
27+
run: make sdl CC=gcc RELEASE=1 -j$(nproc)
28+
29+
- name: Upload artifact
30+
uses: actions/upload-artifact@v4
31+
with:
32+
name: iodoom-linux-x86_64
33+
path: src/iodoom
34+
35+
build-linux-clang:
36+
name: Linux (clang)
37+
runs-on: ubuntu-latest
38+
steps:
39+
- uses: actions/checkout@v4
40+
- run: sudo apt-get update -qq && sudo apt-get install -y libsdl2-dev clang
41+
- working-directory: src
42+
run: make sdl CC=clang -j$(nproc)
43+
44+
build-macos:
45+
name: macOS (SDL2)
46+
runs-on: macos-latest
47+
steps:
48+
- uses: actions/checkout@v4
49+
- run: brew install sdl2
50+
- working-directory: src
51+
run: make sdl -j$(sysctl -n hw.logicalcpu)
52+
- uses: actions/upload-artifact@v4
53+
with:
54+
name: iodoom-macos-arm64
55+
path: src/iodoom

.github/workflows/codeql.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: CodeQL
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
schedule:
9+
- cron: '30 4 * * 1' # Every Monday
10+
11+
jobs:
12+
analyze:
13+
name: Analyze C
14+
runs-on: ubuntu-latest
15+
permissions:
16+
security-events: write
17+
steps:
18+
- uses: actions/checkout@v4
19+
- run: sudo apt-get update -qq && sudo apt-get install -y libsdl2-dev
20+
- uses: github/codeql-action/init@v3
21+
with:
22+
languages: c-cpp
23+
- working-directory: src
24+
run: make sdl -j$(nproc)
25+
- uses: github/codeql-action/analyze@v3

.github/workflows/docs.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Deploy Docs
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
paths:
7+
- 'website/**'
8+
- '.github/workflows/docs.yml'
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
concurrency:
17+
group: pages
18+
cancel-in-progress: false
19+
20+
jobs:
21+
build:
22+
name: Build Docusaurus
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 0
28+
29+
- uses: actions/setup-node@v4
30+
with:
31+
node-version: 20
32+
cache: npm
33+
cache-dependency-path: website/package-lock.json
34+
35+
- name: Install dependencies
36+
working-directory: website
37+
run: npm ci
38+
39+
- name: Build site
40+
working-directory: website
41+
run: npm run build
42+
env:
43+
NODE_OPTIONS: --max-old-space-size=4096
44+
45+
- name: Upload artifact
46+
uses: actions/upload-pages-artifact@v3
47+
with:
48+
path: website/build
49+
50+
deploy:
51+
name: Deploy to GitHub Pages
52+
needs: build
53+
runs-on: ubuntu-latest
54+
environment:
55+
name: github-pages
56+
url: ${{ steps.deployment.outputs.page_url }}
57+
steps:
58+
- name: Deploy
59+
id: deployment
60+
uses: actions/deploy-pages@v4

.github/workflows/release.yml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build-linux:
13+
name: Build Linux binary
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- run: sudo apt-get update -qq && sudo apt-get install -y libsdl2-dev
18+
- working-directory: src
19+
run: make sdl RELEASE=1 -j$(nproc)
20+
- run: |
21+
mkdir -p dist
22+
cp src/iodoom dist/iodoom-linux-x86_64
23+
chmod +x dist/iodoom-linux-x86_64
24+
- uses: actions/upload-artifact@v4
25+
with:
26+
name: linux-binary
27+
path: dist/iodoom-linux-x86_64
28+
29+
build-macos:
30+
name: Build macOS binary
31+
runs-on: macos-latest
32+
steps:
33+
- uses: actions/checkout@v4
34+
- run: brew install sdl2
35+
- working-directory: src
36+
run: make sdl RELEASE=1 -j$(sysctl -n hw.logicalcpu)
37+
- run: |
38+
mkdir -p dist
39+
cp src/iodoom dist/iodoom-macos-arm64
40+
- uses: actions/upload-artifact@v4
41+
with:
42+
name: macos-binary
43+
path: dist/iodoom-macos-arm64
44+
45+
release:
46+
name: Create GitHub Release
47+
needs: [build-linux, build-macos]
48+
runs-on: ubuntu-latest
49+
steps:
50+
- uses: actions/checkout@v4
51+
52+
- uses: actions/download-artifact@v4
53+
with:
54+
name: linux-binary
55+
path: dist/
56+
57+
- uses: actions/download-artifact@v4
58+
with:
59+
name: macos-binary
60+
path: dist/
61+
62+
- name: Create release
63+
uses: softprops/action-gh-release@v2
64+
with:
65+
name: "iodoom ${{ github.ref_name }}"
66+
body: |
67+
## iodoom ${{ github.ref_name }}
68+
69+
A user-friendly fork of doomgeneric.
70+
71+
### Downloads
72+
- **Linux x86_64** – `iodoom-linux-x86_64`
73+
- **macOS ARM64** – `iodoom-macos-arm64`
74+
75+
### Usage
76+
```
77+
./iodoom -iwad /path/to/doom.wad
78+
```
79+
80+
### Environment Variables
81+
| Variable | Default | Description |
82+
|---|---|---|
83+
| `IODOOM_SCALE` | `0` | 0=auto-fit, 1/2/3=integer scale |
84+
| `IODOOM_FPS` | `35` | FPS cap (35 = Doom native) |
85+
| `IODOOM_VSYNC` | `0` | VSync on/off |
86+
| `IODOOM_FULLSCREEN` | `0` | Start fullscreen |
87+
| `IODOOM_MOUSE` | `0` | Enable mouse look |
88+
files: |
89+
dist/iodoom-linux-x86_64
90+
dist/iodoom-macos-arm64
91+
draft: false
92+
prerelease: false

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
src/build/
2+
src/iodoom
3+
src/iodoom-xlib
4+
src/*.map
5+
*.o
6+
*.d
7+
dist/

0 commit comments

Comments
 (0)