Merge pull request #318 from ooni/issue/1440c

cleanup: remove mobile-staging and legacy build scripts
This commit is contained in:
Simone Basso 2021-04-29 10:46:43 +02:00 committed by GitHub
commit 958c3fec58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 12 additions and 78 deletions

View File

@ -2,7 +2,6 @@ name: android
on:
push:
branches:
- mobile-staging
- "release/**"
jobs:
test:

View File

@ -7,7 +7,7 @@ name: "CodeQL"
on:
push:
branches: [ master, mobile-staging, 'release/**' ]
branches: [ master, 'release/**' ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]

View File

@ -2,7 +2,6 @@ name: ios
on:
push:
branches:
- mobile-staging
- 'release/**'
jobs:
test:

View File

@ -35,34 +35,27 @@ This will generate a binary called `ooniprobe` in the current directory.
## Android bindings
```bash
./build-android.bash
./make -t android
```
We automatically build Android bindings whenever commits are pushed to the
`mobile-staging` branch. Such builds could be integrated by using:
Builds bindings for Android. (Add `----disable-embedding-psiphon-config` if you
cannot clone private repositories in the https://github.com/ooni namespace.)
```Groovy
implementation "org.ooni:oonimkall:VERSION"
```
Where VERSION is like `2020.03.30-231914` corresponding to the
time when the build occurred.
The generated bindings are (manually) pushed to the Maven Central package
repository. The instructions explaining how to integrate these bindings
are published along with the release notes.
## iOS bindings
```bash
./build-ios.bash
./make -t ios
```
We automatically build iOS bindings whenever commits are pushed to the
`mobile-staging` branch. Such builds could be integrated by using:
Builds bindings for iOS. (Add `----disable-embedding-psiphon-config` if you
cannot clone private repositories in the https://github.com/ooni namespace.)
```ruby
pod 'oonimkall', :podspec => 'https://dl.bintray.com/ooni/ios/oonimkall-VERSION.podspec'
```
Where VERSION is like `2020.03.30-231914` corresponding to the
time when the build occurred.
The generated bindings are (manually) added to GitHub releases. The instructions
explaining how to integrate these bindings are published along with the release notes.
## Updating dependencies

View File

@ -1,42 +0,0 @@
#!/bin/bash
set -e
if [ -z "$ANDROID_HOME" -o "$1" = "--help" ]; then
echo ""
echo "usage: $0 [--sign]"
echo ""
echo "Please set ANDROID_HOME. We assume you have installed"
echo "the Android SDK. You can do that on macOS using:"
echo ""
echo " brew install --cask android-sdk"
echo ""
echo "Then make sure you install the required packages:"
echo ""
echo "sdkmanager --install 'build-tools;29.0.3' 'ndk-bundle'"
echo ""
echo "or, if you already installed, that you're up to date:"
echo ""
echo "sdkmanager --update"
echo ""
echo "Once you have done that, please export ANDROID_HOME to"
echo "point to /usr/local/Caskroom/android-sdk/<version>."
echo ""
exit 1
fi
topdir=$(cd $(dirname $0) && pwd -P)
set -x
export PATH=$(go env GOPATH)/bin:$PATH
go get -u golang.org/x/mobile/cmd/gomobile
gomobile init
version=$(date -u +%Y.%m.%d-%H%M%S)
aarfile=MOBILE/android/oonimkall-$version.aar
gomobile bind -target=android -o $aarfile -ldflags="-s -w" ./pkg/oonimkall
pomfile=./MOBILE/android/oonimkall-$version.pom
pomtemplate=./MOBILE/template.pom
cat $pomtemplate|sed "s/@VERSION@/$version/g" > $pomfile
if [ "$1" == "--sign" ]; then
cd ./MOBILE/android
for file in `ls *`; do
gpg -ab -u simone@openobservatory.org $file
done
jar -cvf bundle.jar oonimkall-$version*
fi

View File

@ -1,15 +0,0 @@
#!/bin/bash
set -e
topdir=$(cd $(dirname $0) && pwd -P)
set -x
export PATH=$(go env GOPATH)/bin:$PATH
go get -u golang.org/x/mobile/cmd/gomobile
gomobile init
output=MOBILE/ios/oonimkall.framework
gomobile bind -target=ios -o $output -ldflags="-s -w" ./pkg/oonimkall
release=$(git describe --tags || echo $GITHUB_SHA)
version=$(date -u +%Y.%m.%d-%H%M%S)
podspecfile=./MOBILE/ios/oonimkall.podspec
(cd ./MOBILE/ios && rm -f oonimkall.framework.zip && zip -yr oonimkall.framework.zip oonimkall.framework)
podspectemplate=./MOBILE/template.podspec
cat $podspectemplate|sed -e "s/@VERSION@/$version/g" -e "s/@RELEASE@/$release/g" > $podspecfile