Skip to content

Commit 74a0bbb

Browse files
authored
Merge pull request #66 from libretro/build-test
[CI/CD] GitHub Action to build matrix of platform targets on PRs
2 parents 32433e9 + df51c29 commit 74a0bbb

3 files changed

Lines changed: 87 additions & 0 deletions

File tree

.github/workflows/artifacts.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: add artifact links to pull request and related issues
2+
on:
3+
workflow_run:
4+
workflows: ["Build"]
5+
types: [completed]
6+
7+
jobs:
8+
artifacts-url-comments:
9+
name: add artifact links to pull request and related issues job
10+
runs-on: windows-2019
11+
steps:
12+
- name: add artifact links to pull request and related issues step
13+
uses: tonyhallett/[email protected]
14+
env:
15+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16+
with:
17+
prefix: Here are the artifacts
18+
suffix: Have a nice day.
19+
format: name
20+
addTo: pullandissues

.github/workflows/c-cpp.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: C/C++ CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
config:
15+
- displayTargetName: 'Ubuntu Latest GCC'
16+
artifact: 'virtualjaguar_libretro.so'
17+
os: ubuntu-latest
18+
build_type: 'Release'
19+
cc: 'gcc'
20+
cxx: 'g++'
21+
- displayTargetName: 'macOS Latest Clang'
22+
artifact: 'virtualjaguar_libretro.dylib'
23+
os: macos-latest
24+
build_type: 'Release'
25+
cc: 'clang'
26+
cxx: 'clang++'
27+
# - displayTargetName: 'Windows Latest MinGW'
28+
# artifact: 'virtualjaguar_libretro.so'
29+
# os: windows-latest
30+
# build_type: 'Release'
31+
# cc: 'gcc'
32+
# cxx: 'g++'
33+
34+
name: build-${{matrix.config.os}}
35+
runs-on: ${{ matrix.config.os }}
36+
37+
steps:
38+
- uses: actions/checkout@v2
39+
- name: Add Msys64 to PATH
40+
if: matrix.config.os == 'windows-latest'
41+
run: |
42+
echo "/c/msys64/mingw64/bin" >> $GITHUB_PATH
43+
echo "/c/msys64/usr/bin" >> $GITHUB_PATH
44+
shell: bash
45+
- name: make
46+
run: make -j4
47+
48+
# - name: Upload the artifacts
49+
# uses: skx/github-action-publish-binaries@master
50+
# env:
51+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
# with:
53+
# args: ${{ matrix.config.artifact }}
54+
55+
- name: upload artifacts
56+
uses: actions/upload-artifact@v2
57+
with:
58+
name: core-${{ matrix.config.os }}
59+
path: ${{ matrix.config.artifact }}
60+
if-no-files-found: error
61+
62+
- name: download artifacts
63+
uses: actions/download-artifact@v2
64+
with:
65+
name: core-${{ matrix.config.os }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@
55
*.exe
66
*.js
77
*.bc
8+
.DS_Store
9+
.build

0 commit comments

Comments
 (0)