forked from ps3dev/ps3toolchain
-
Notifications
You must be signed in to change notification settings - Fork 3
123 lines (101 loc) · 3.55 KB
/
deploy.yaml
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: ci
on:
push:
pull_request:
workflow_dispatch:
repository_dispatch:
types: [run_build]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
architecture: [x64]
defaults:
run:
shell: bash
outputs:
sha8: ${{ steps.slug.outputs.sha8 }}
date: ${{ steps.date.outputs.date }}
steps:
- uses: actions/checkout@v4
- name: Get short SHA
id: slug
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Get current arch
id: arch
run: echo "::set-output name=arch::$(uname -m)"
- name: Install Ubuntu requirements
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt update
sudo apt -y install autoconf automake bison flex gcc g++ libelf-dev make texinfo libncurses5-dev patch python2-dev subversion wget zlib1g-dev libtool-bin python-dev-is-python3 bzip2 libgmp3-dev pkg-config libssl-dev && \
if [ "$(uname -m)" = "x86_64" ]; then sudo apt install -y nvidia-cg-toolkit ; fi
- name: Install macOS requirements
if: startsWith(matrix.os, 'macos')
# act -P macos-latest=-self-hosted --container-architecture linux/amd64
run: |
brew update
brew install autoconf automake openssl libelf ncurses zlib gmp wget pkg-config gnu-sed texinfo
echo "alias sed='gsed'" >> ~/.bashrc
# check current version
python --version
#python-config --libs
# install pyenv
brew install pyenv
# Initialize pyenv in the current shell
eval "$(pyenv init --path)"
# Install Python 3.11 using pyenv
pyenv install 3.11.0
# Set Python 3.11 as the global version
pyenv global 3.11.0
pip install python-config
echo 'eval "$(pyenv init --path)"' >> ~/.bashrc
echo 'pyenv global 3.11.0' >> ~/.bashrc
echo 'echo bashrc loaded' >> ~/.bashrc
- name: Runs all the stages in the shell
run: |
. ~/.bashrc
mkdir -p $PWD/ps3dev
export PS3DEV=$PWD/ps3dev
export PSL1GHT=$PS3DEV
export PATH=$PATH:$PS3DEV/bin
export PATH=$PATH:$PS3DEV/ppu/bin
export PATH=$PATH:$PS3DEV/spu/bin
export PATH=$PATH:$PS3DEV/portlibs/ppu/bin
export PKG_CONFIG_PATH=$PS3DEV/portlibs/ppu/lib/pkgconfig
./toolchain.sh
- name: Compress ps3dev folder
run: |
tar -zcvf ps3dev-${{matrix.os}}-${{steps.arch.outputs.arch}}-${{steps.date.outputs.date}}.tar.gz ps3dev
- name: Archive Folder
uses: actions/upload-artifact@v4
with:
name: ${{matrix.os}}-${{matrix.architecture}}
path: ps3dev-*.tar.gz
publish:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download all Artifact
uses: actions/download-artifact@v4
- name: Set SemVer
id: semver
run: echo "::set-output name=semver::0.1.0+${{ needs.build.outputs.date }}.${{ needs.build.outputs.sha8 }}"
- name: Create Tag
uses: negz/create-tag@v1
with:
version: ${{ steps.semver.outputs.semver }}
message: "automatic tag creation"
token: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.semver.outputs.semver }}
files: |
${{ github.workspace }}/*.tar.gz