Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Update and build on PR #27

Merged
merged 4 commits into from
Nov 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 18 additions & 29 deletions .github/workflows/pushaction.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,26 @@
name: Compile and deploy snapshot artifacts

on:
push:
branches:
- master
- sdl/**
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@v3
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: Set up JDK 8
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 8

- name: Setup Gradle
uses: gradle/[email protected]

- 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
Expand Down Expand Up @@ -62,27 +54,20 @@ jobs:
ORG_GRADLE_PROJECT_GITHUB_USERNAME: ""
ORG_GRADLE_PROJECT_GITHUB_API_TOKEN: ""
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: Set up JDK 8
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 8

- run: sudo sed -i 's/deb http/deb [arch=amd64,i386] http/' /etc/apt/sources.list
- run: sudo grep "ubuntu.com/ubuntu" /etc/apt/sources.list | sudo tee /etc/apt/sources.list.d/ports.list
- run: sudo sed -i 's/amd64,i386/armhf,arm64/' /etc/apt/sources.list.d/ports.list
- run: sudo sed -i 's#http://.*/ubuntu#http://ports.ubuntu.com/ubuntu-ports#' /etc/apt/sources.list.d/ports.list
- name: Setup Gradle
uses: gradle/[email protected]

- 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
Expand Down Expand Up @@ -149,9 +134,13 @@ jobs:
with:
name: output-libs
path: build/libs/
- name: Snapshot build deploy
- 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 build publish
./gradlew publish
33 changes: 11 additions & 22 deletions .github/workflows/releaseaction.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,19 @@ jobs:
macos:
runs-on: macos-11
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: Set up JDK 8
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 8

- name: Setup Gradle
uses: gradle/[email protected]

- 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
Expand Down Expand Up @@ -61,27 +57,20 @@ jobs:
ORG_GRADLE_PROJECT_GITHUB_USERNAME: ""
ORG_GRADLE_PROJECT_GITHUB_API_TOKEN: ""
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: Set up JDK 8
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 8

- run: sudo sed -i 's/deb http/deb [arch=amd64,i386] http/' /etc/apt/sources.list
- run: sudo grep "ubuntu.com/ubuntu" /etc/apt/sources.list | sudo tee /etc/apt/sources.list.d/ports.list
- run: sudo sed -i 's/amd64,i386/armhf,arm64/' /etc/apt/sources.list.d/ports.list
- run: sudo sed -i 's#http://.*/ubuntu#http://ports.ubuntu.com/ubuntu-ports#' /etc/apt/sources.list.d/ports.list
- name: Setup Gradle
uses: gradle/[email protected]

- 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
Expand Down