diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 737a8e7..560b1d4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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') diff --git a/build/build.android.sh b/build/build.android.sh index 6613253..9fe8dc4 100755 --- a/build/build.android.sh +++ b/build/build.android.sh @@ -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 \ No newline at end of file