Skip to content

Commit

Permalink
feat: Enable TLS 1.3 and add CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jmir1 committed May 5, 2024
1 parent 853e2cc commit 7a78329
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 64 deletions.
100 changes: 36 additions & 64 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,64 +1,36 @@
name: CI

# Controls when the workflow will run
on:
# Triggers the workflow on push events
push:
tags:
- '*'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

permissions:
contents: write

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: '17'
distribution: temurin

- name: Build the release artifacts
run: |
set -x
unset ANDROID_SDK_ROOT
cd buildscripts
./download.sh > /dev/null
./buildall.sh --arch x86 mpv
./buildall.sh --arch x86_64 mpv
./buildall.sh --arch arm64 mpv
./buildall.sh
env:
GRADLE_OPTS: "-Xmx1G"
- name: Get tag name
if: startsWith(github.ref, 'refs/tags/')
run: |
set -x
echo "VERSION_TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Copy build artifacts
if: startsWith(github.ref, 'refs/tags/')
run: |
set -e
mv app/build/outputs/aar/app-default-release.aar aniyomi-mpv-lib-${{ env.VERSION_TAG }}.aar
- name: Create Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/[email protected]
with:
tag_name: ${{ env.VERSION_TAG }}
name: aniyomi-mpv-lib ${{ env.VERSION_TAG }}
body: |
library version ${{ env.VERSION_TAG }}
files: |
aniyomi-mpv-lib-${{ env.VERSION_TAG }}.aar
draft: false
prerelease: false
name: CI

on:
push:
branches:
- master
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
architecture: [armv7l, arm64, x86, x86_64]

permissions:
contents: write

steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: temurin

- name: Build the release artifacts
run: |
set -x
unset ANDROID_SDK_ROOT
cd buildscripts
./download.sh > /dev/null
./buildall.sh --arch ${{ matrix.architecture }} mpv
./buildall.sh -n
env:
GRADLE_OPTS: -Xmx4G
57 changes: 57 additions & 0 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: CI

on:
push:
tags:
- '*'

workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

permissions:
contents: write

steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: temurin

- name: Build the release artifacts
run: |
set -x
unset ANDROID_SDK_ROOT
cd buildscripts
./download.sh > /dev/null
./buildall.sh --arch x86 mpv
./buildall.sh --arch x86_64 mpv
./buildall.sh --arch arm64 mpv
./buildall.sh
env:
GRADLE_OPTS: -Xmx4G
- name: Get tag name
if: startsWith(github.ref, 'refs/tags/')
run: |
set -x
echo "VERSION_TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Copy build artifacts
if: startsWith(github.ref, 'refs/tags/')
run: |
set -e
mv app/build/outputs/aar/app-default-release.aar aniyomi-mpv-lib-${{ env.VERSION_TAG }}.aar
- name: Create Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ env.VERSION_TAG }}
name: aniyomi-mpv-lib ${{ env.VERSION_TAG }}
body: |
library version ${{ env.VERSION_TAG }}
files: |
aniyomi-mpv-lib-${{ env.VERSION_TAG }}.aar
draft: false
prerelease: false
3 changes: 3 additions & 0 deletions buildscripts/scripts/mbedtls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,8 @@ else
./scripts/config.py set MBEDTLS_AESNI_C
fi

# enable TLS 1.3
./scripts/config.py set MBEDTLS_SSL_PROTO_TLS1_3

make -j$cores no_test
make DESTDIR="$prefix_dir" install

0 comments on commit 7a78329

Please sign in to comment.