Skip to content

Commit

Permalink
fix: actions build android & revert build.android.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
lambiengcode committed Oct 16, 2023
1 parent 1aaaf19 commit c02ae06
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 19 deletions.
16 changes: 2 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,24 +72,12 @@ jobs:
# 13G
sudo rm -rf /usr/local/lib/android
df -h
- name: Setup ${{ matrix.name }} for x86_64
if: endsWith(matrix.name, '_x86_64')
run: sudo scripts/apt_install_x86_64.sh
- name: Setup ${{ matrix.name }} for arm
if: contains(matrix.name, '_armv')
run: sudo scripts/apt_install_arm.sh
- name: Setup ${{ matrix.name }} for android
if: matrix.name == 'android'
run: sudo scripts/apt_install_x86_64.sh && sudo apt-get install -y openjdk-11-jdk
- name: Build ${{ matrix.name }}
run: |
python3 run.py build ${{ matrix.name }}
python3 run.py package ${{ matrix.name }}
- run: ./build.${{ matrix.name }}.sh "${{ github.event.inputs.commitHash }}"
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: webrtc.${{ matrix.name }}.tar.gz
path: _package/${{ matrix.name }}/webrtc.${{ matrix.name }}.tar.gz
path: build/_package/${{ matrix.name }}/webrtc.tar.gz
create-release:
name: Create Release
if: contains(github.ref, 'tags/m')
Expand Down
9 changes: 4 additions & 5 deletions build/build.android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ IMAGE_NAME=webrtc/$PACKAGE_NAME:m${WEBRTC_VERSION}
DOCKER_BUILDKIT=1 docker build \
-t $IMAGE_NAME \
-f $PACKAGE_NAME/Dockerfile \
--build-arg COMMIT_HASH="$WEBRTC_COMMIT" \
--build-arg COMMIT_HASH="$1" \
.

mkdir -p $PACKAGE_DIR
CONTAINER_ID=`docker container create -i -t --name webrtc-container $IMAGE_NAME`
docker container cp $CONTAINER_ID:/webrtc.tar.gz ../
docker container rm $CONTAINER_ID
docker rmi -f $IMAGE_NAME
CONTAINER_ID=`docker container create $IMAGE_NAME`
docker container cp $CONTAINER_ID:/webrtc.tar.gz $PACKAGE_DIR/webrtc.tar.gz
docker container rm $CONTAINER_ID

0 comments on commit c02ae06

Please sign in to comment.