-
Notifications
You must be signed in to change notification settings - Fork 11
77 lines (66 loc) · 2.62 KB
/
Build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Build and Publish Docs
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os[0] }}
strategy:
matrix:
os: [
[macos-13, x86_64, bash],
[ubuntu-22.04, x86_64, bash]
]
fail-fast: false
defaults:
run:
shell: ${{ matrix.os[2] }} {0}
steps:
- uses: actions/checkout@v4
- name: Install dependencies on required OS
run: |
# Set OS specific variables
if [[ "${{ matrix.os[0] }}" == "ubuntu-22.04" ]]; then
URL="https://github.com/pspdev/pspdev/releases/download/v20240609/pspdev-ubuntu-latest-x86_64.tar.gz"
elif [[ "${{ matrix.os[0] }}" == "macos-13" ]]; then
URL="https://github.com/pspdev/pspdev/releases/download/v20240609/pspdev-macos-13-x86_64.tar.gz"
fi
# Extract the file name from the URL
FILE=$(basename $URL)
# Download the release tarball
wget $URL
# Extract the tarball
tar -xzf $FILE
- name: Runs build in shell
run: |
export PATH="$(brew --prefix gnu-sed)/libexec/gnubin:$PATH" # This really is only needed for macOS
export PATH="$(brew --prefix libtool)/libexec/gnubin:$PATH" # This really is only needed for macOS
export PKG_CONFIG_PATH="$(brew --prefix libarchive)/lib/pkgconfig:$(brew --prefix openssl)/lib/pkgconfig" # This really is only needed for macOS
export PSPDEV=$PWD/pspdev
export PATH=$PATH:$PSPDEV/bin
make
publish-docs:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup PSPDEV Environment
run: |
URL="https://github.com/pspdev/pspdev/releases/download/v20240609/pspdev-ubuntu-latest-x86_64.tar.gz"
FILE=$(basename $URL)
wget $URL
tar -xzf $FILE
export PATH="$(brew --prefix gnu-sed)/libexec/gnubin:$PATH" # This really is only needed for macOS
export PATH="$(brew --prefix libtool)/libexec/gnubin:$PATH" # This really is only needed for macOS
export PKG_CONFIG_PATH="$(brew --prefix libarchive)/lib/pkgconfig:$(brew --prefix openssl)/lib/pkgconfig" # This really is only needed for macOS
export PSPDEV=$PWD/pspdev
export PATH=$PATH:$PSPDEV/bin
- name: Generate documentation
run: make gendoc
- name: Publish to GitHub Pages
run: |
make ghpages
env:
GIT_AUTHOR_NAME: github-actions
GIT_AUTHOR_EMAIL: [email protected]
GIT_COMMITTER_NAME: github-actions
GIT_COMMITTER_EMAIL: [email protected]
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}