forked from MrStahlfelge/Jamepad
-
Notifications
You must be signed in to change notification settings - Fork 14
146 lines (127 loc) · 6.97 KB
/
pushaction.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
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
name: Compile and deploy snapshot artifacts
on: [push, pull_request] # Don't worry, the actual deployment is guarded with an "if" and only done on push to master
env:
GRADLE_USER_HOME: .gradle
jobs:
macos:
runs-on: macos-11
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 8
- name: Setup Gradle
uses: gradle/gradle-build-action@v2.4.2
- run: mkdir -p SDL/build-macosarm64
# No --disable-video for macOS https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c70c727c98b24ad8b44e05285b8785be15062af0
- run: ../configure --host=aarch64-apple-darwin CFLAGS="-arch arm64 -fPIC -mmacosx-version-min=10.7" CPPFLAGS="-arch arm64 -fPIC -mmacosx-version-min=10.7" LDFLAGS="-arch arm64 -mmacosx-version-min=10.7" --disable-audio --disable-video-vulkan --disable-render --disable-filesystem --disable-threads --disable-directx --disable-mmx --disable-3dnow --disable-sse --disable-sse2 --disable-sse3 --disable-cpuinfo --disable-sensor --enable-hidapi --disable-joystick-mfi
working-directory: SDL/build-macosarm64
- run: make -j
working-directory: SDL/build-macosarm64
- run: mkdir -p SDL/build-macos64
# No --disable-video for macOS https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c70c727c98b24ad8b44e05285b8785be15062af0
- run: ../configure CFLAGS="-arch x86_64 -fPIC -mmacosx-version-min=10.7" CPPFLAGS="-arch x86_64 -fPIC -mmacosx-version-min=10.7" LDFLAGS="-arch x86_64 -mmacosx-version-min=10.7" --disable-audio --disable-video-vulkan --disable-render --disable-filesystem --disable-threads --disable-directx --disable-mmx --disable-3dnow --disable-sse --disable-sse2 --disable-sse3 --disable-cpuinfo --disable-sensor --enable-hidapi --disable-joystick-mfi
working-directory: SDL/build-macos64
- run: make -j
working-directory: SDL/build-macos64
- run: sudo make install
working-directory: SDL/build-macos64
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew jnigen jnigenBuild
- name: Upload macOS natives
uses: actions/upload-artifact@v3
with:
name: macos-natives
path: libs
linux:
needs: macos
runs-on: ubuntu-20.04
env:
ORG_GRADLE_PROJECT_GITHUB_USERNAME: ""
ORG_GRADLE_PROJECT_GITHUB_API_TOKEN: ""
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 8
- name: Setup Gradle
uses: gradle/gradle-build-action@v2.4.2
- run: echo "http://ports.ubuntu.com/ubuntu-ports" | sudo tee -a /etc/apt/apt-mirrors.txt
- name: Add extra platform architectures
run: sudo dpkg --add-architecture i386; sudo dpkg --add-architecture armhf; sudo dpkg --add-architecture arm64
- run: sudo apt-get update || true
- name: Install Windows compilers
run: sudo apt-get -yq install g++-mingw-w64-i686 g++-mingw-w64-x86-64
- name: Install Linux x86 compilers/libraries
run: sudo apt-get -yq install gcc-multilib g++-multilib linux-libc-dev:i386
- name: Install Linux arm32 compilers/libraries
run: sudo apt-get -yq install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf binutils-arm-linux-gnueabihf
- name: Install Linux arm64 compilers/libraries
run: sudo apt-get -yq install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu
- name: Download macOS natives
uses: actions/download-artifact@v3
with:
name: macos-natives
path: libs
- run: find -type f -name "*.h" -exec sed -i 's/extern DECLSPEC//' {} \;
working-directory: SDL
- run: sed -i 's/#define SDL_DYNAMIC_API 1/#define SDL_DYNAMIC_API 0/' SDL/src/dynapi/SDL_dynapi.h
- run: mkdir -p SDL/build-linux64
- run: ../configure CFLAGS="-fPIC" CPPFLAGS="-fPIC" --disable-audio --disable-video --disable-video-vulkan --disable-render --disable-filesystem --disable-threads --disable-directx --disable-mmx --disable-3dnow --disable-sse --disable-sse2 --disable-sse3 --disable-cpuinfo --disable-sensor --enable-hidapi
working-directory: SDL/build-linux64
- run: make -j
working-directory: SDL/build-linux64
- run: mkdir -p SDL/build-linux32
- run: ../configure CFLAGS="-fPIC -m32" CPPFLAGS="-fPIC -m32" LDFLAGS="-m32" --disable-audio --disable-video --disable-video-vulkan --disable-render --disable-filesystem --disable-threads --disable-directx --disable-mmx --disable-3dnow --disable-sse --disable-sse2 --disable-sse3 --disable-cpuinfo --disable-sensor --enable-hidapi
working-directory: SDL/build-linux32
- run: make -j
working-directory: SDL/build-linux32
- run: mkdir -p SDL/build-linuxarm32
- run: ../configure --host=arm-linux-gnueabihf CFLAGS="-fPIC" CPPFLAGS="-fPIC" --disable-audio --disable-video --disable-video-vulkan --disable-render --disable-filesystem --disable-threads --disable-directx --disable-mmx --disable-3dnow --disable-sse --disable-sse2 --disable-sse3 --disable-cpuinfo --disable-sensor --enable-hidapi
working-directory: SDL/build-linuxarm32
- run: make -j
working-directory: SDL/build-linuxarm32
- run: mkdir -p SDL/build-linuxarm64
- run: ../configure --host=aarch64-linux-gnu CFLAGS="-fPIC" CPPFLAGS="-fPIC" --disable-audio --disable-video --disable-video-vulkan --disable-render --disable-filesystem --disable-threads --disable-directx --disable-mmx --disable-3dnow --disable-sse --disable-sse2 --disable-sse3 --disable-cpuinfo --disable-sensor --enable-hidapi
working-directory: SDL/build-linuxarm64
- run: make -j
working-directory: SDL/build-linuxarm64
- run: mkdir -p SDL/build-windows32
- run: ../configure --host=i686-w64-mingw32 --disable-audio --disable-render --disable-power --disable-filesystem --disable-hidapi
working-directory: SDL/build-windows32
- run: make -j
working-directory: SDL/build-windows32
- run: mkdir -p SDL/build-windows64
- run: ../configure --host=x86_64-w64-mingw32 --disable-audio --disable-render --disable-power --disable-filesystem --disable-hidapi
working-directory: SDL/build-windows64
- run: make -j
working-directory: SDL/build-windows64
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew jnigen jnigenBuild jnigenJarNativesDesktop
- name: Upload all output libs
uses: actions/upload-artifact@v3
with:
name: output-libs
path: build/libs/
- name: Snapshot build
run:
./gradlew build
- name: Snapshot deploy
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository_owner == 'libgdx'
env:
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
run:
./gradlew publish