Skip to content

Commit 077b057

Browse files
authored
chore: ci
1 parent 3b2db2b commit 077b057

File tree

3 files changed

+102
-20
lines changed

3 files changed

+102
-20
lines changed

.github/workflows/compile.yml

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ name: CI
33
on:
44
push:
55
branches: [ master ]
6-
tags:
7-
- 'v*.*.*'
6+
87

98
jobs:
109
build_linux:
@@ -84,20 +83,3 @@ jobs:
8483
with:
8584
name: SimpleNES-win.exe
8685
path: build/Release/SimpleNES.exe
87-
88-
release:
89-
runs-on: ubuntu-latest
90-
needs: [build_linux, build_macos, build_windows]
91-
if: startsWith(github.ref, 'refs/tags/v')
92-
steps:
93-
- uses: actions/download-artifact@v4
94-
with:
95-
path: artifacts
96-
merge-multiple: true
97-
- name: Display structure of downloaded files
98-
run: ls -R artifacts
99-
- name: Release
100-
uses: softprops/action-gh-release@v2
101-
with:
102-
files: artifacts/*
103-

.github/workflows/pr.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI
1+
name: PR
22

33
on:
44
pull_request:

.github/workflows/release.yaml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: CI
2+
3+
on:
4+
workflow_dispatch:
5+
6+
7+
jobs:
8+
build_linux:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
with:
13+
fetch-depth: 1
14+
15+
- name: Install dependencies
16+
run: |
17+
sudo apt update
18+
sudo apt install -y libsfml-dev
19+
20+
- name: Build
21+
run: |
22+
mkdir build/ && cd build/
23+
cmake -DCMAKE_BUILD_TYPE=Release ..
24+
make -j4
25+
- uses: actions/upload-artifact@v4
26+
with:
27+
name: SimpleNES-linux
28+
path: build/SimpleNES
29+
30+
31+
build_macos:
32+
runs-on: macos-latest
33+
steps:
34+
- uses: actions/checkout@v2
35+
with:
36+
fetch-depth: 1
37+
38+
- name: Install dependencies
39+
run: |
40+
brew install sfml@2
41+
brew link --force --overwrite sfml@2
42+
43+
- name: Build
44+
run: |
45+
mkdir build/ && cd build/
46+
cmake -DCMAKE_BUILD_TYPE=Release ..
47+
make -j4
48+
49+
- uses: actions/upload-artifact@v4
50+
with:
51+
name: SimpleNES-macos
52+
path: build/SimpleNES
53+
54+
build_windows:
55+
runs-on: windows-latest
56+
steps:
57+
- uses: actions/checkout@v2
58+
with:
59+
fetch-depth: 1
60+
61+
- name: Install dependencies
62+
run: |
63+
$manifest = @'
64+
{
65+
"dependencies": [ "sfml" ],
66+
"builtin-baseline": "df6921c0b6cdf95269a4a3093e267b59e4bf0f5b",
67+
"overrides": [
68+
{ "name": "sfml", "version": "2.6.2" }
69+
]
70+
}
71+
'@
72+
Add-Content ./vcpkg.json $manifest
73+
vcpkg install
74+
75+
- name: Build
76+
run: |
77+
mkdir build/ && cd build/
78+
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake ..
79+
cmake --build . --config Release
80+
81+
- uses: actions/upload-artifact@v4
82+
with:
83+
name: SimpleNES-win.exe
84+
path: build/Release/SimpleNES.exe
85+
86+
release:
87+
runs-on: ubuntu-latest
88+
needs: [build_linux, build_macos, build_windows]
89+
steps:
90+
- uses: actions/download-artifact@v4
91+
with:
92+
path: artifacts
93+
merge-multiple: true
94+
- name: Display structure of downloaded files
95+
run: ls -R artifacts
96+
- name: Release
97+
uses: softprops/action-gh-release@v2
98+
with:
99+
files: artifacts/*
100+

0 commit comments

Comments
 (0)