Skip to content

Commit

Permalink
Fixes iOS 15 & Support CI build
Browse files Browse the repository at this point in the history
  • Loading branch information
NyaMisty committed Mar 22, 2022
1 parent c997a51 commit 9a33a79
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 3 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Build AltServer

on:
push:

env:
REGISTRY: ghcr.io

jobs:
build:
strategy:
matrix:
builder: [ghcr.io/nyamisty/altserver_builder_alpine_armv7, ghcr.io/nyamisty/altserver_builder_alpine_aarch64, ghcr.io/nyamisty/altserver_builder_alpine_amd64, ghcr.io/nyamisty/altserver_builder_alpine_i386]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: master # set the branch to merge to
fetch-depth: 0
submodules: recursive
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Prepare build
run: mkdir /tmp/build_output
- name: Build
run: |
image=${{ matrix.builder }}
docker pull $image
docker run -v ${PWD}:/workdir -w /workdir $image make NO_USBMUXD_STUB=1 NO_UPNP_STUB=1 -j3
mv AltServer-* /tmp/build_output
git clean -fdX
- name: Upload to github artifact
uses: NyaMisty/upload-artifact-as-is@master
with:
path: /tmp/build_output

release:
runs-on: ubuntu-latest
needs: [build]
name: "release"
steps:
- name: "Create artifact directory"
run: |
mkdir -p build_output
- name: "Download all artifacts"
uses: actions/download-artifact@v2
with:
path: build_output
- name: "Rearrange artifacts"
run: |
find build_output
mkdir -p build_release
mv build_output/*/* build_release
ls build_release
if [ "$(ls -A build_release)" ]; then exit 0; else exit 1; fi
- name: Release
uses: softprops/action-gh-release@v1
if: ${{ startsWith(github.ref, 'refs/tags/') }}
with:
files: build_release/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

17 changes: 15 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,26 @@ else
endif


ARCH := $(shell gcc -dumpmachine | cut -d- -f 1)

PROGRAM := $(PROGRAM)-$(ARCH)

%.c.o : %.c
$(CC) $(CFLAGS) $(EXTRA_FLAGS) -o $@ -c $<

%.cpp.o : %.cpp
$(CXX) $(CXXFLAGS) $(EXTRA_FLAGS) -o $@ -c $<

CFLAGS := -DHAVE_CONFIG_H -DDEBUG -O0 -g -mno-default
CFLAGS := -DHAVE_CONFIG_H -DDEBUG -O0 -g

ifeq ($(ARCH),i386)
CFLAGS += -mno-default
endif

ifeq ($(ARCH),i686)
CFLAGS += -mno-default
endif

CXXFLAGS = $(CFLAGS) -std=c++17

main_src := $(wildcard src/*.c) $(wildcard src/*.cpp)
Expand Down Expand Up @@ -93,4 +106,4 @@ clean:
rm -f $(allobj) libraries/*.a $(PROGRAM)

all: $(PROGRAM)
.DEFAULT_GOAL := all
.DEFAULT_GOAL := all
2 changes: 1 addition & 1 deletion libraries/AltSign
Submodule AltSign updated 1 files
+1 −1 ldid/ldid.cpp

1 comment on commit 9a33a79

@Macleykun
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May i suggest to add the notes to use the container way into the readme?

Please sign in to comment.