diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 7a1bbc6..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,93 +0,0 @@ -version: 2.1 - -orbs: - azure-cli: circleci/azure-cli@1.2.2 - -commands: - prepare: - steps: - - checkout - - run: - name: Install Packages - command: sudo apt update && sudo apt install -y binutils-arm-linux-gnueabi binutils-arm-linux-gnueabihf binutils-mips64el-linux-gnuabi64 binutils-mipsel-linux-gnu - - run: - name: Delete Unneeded Freetype Packages - command: | - if [ -d out/sysroot-build/bullseye/debian-packages]; then - rm out/sysroot-build/bullseye/debian-packages/libfreetype6* - fi - - run: - name: Install dependencies - command: python3 -m pip install --upgrade requests - build-image: - parameters: - image: - type: string - steps: - - prepare - - run: - name: Build << parameters.image >> sysroot - command: | - ./build/linux/sysroot_scripts/sysroot_creator.py build << parameters.image >> - - persist_to_workspace: - root: . - paths: - - out/sysroot-build/bullseye/*.tar.xz - -jobs: - build: - parameters: - image: - type: string - docker: - - image: cimg/python:3.9.19 - resource_class: 2xlarge - steps: - - build-image: - image: << parameters.image >> - upload-images: - docker: - - image: cimg/python:3.9.19 - resource_class: large - steps: - - prepare - - azure-cli/install - - attach_workspace: - at: . - - run: - name: Upload Sysroots - command: SKIP_SYSROOT_BUILD=true ./build/linux/sysroot_scripts/build_and_upload.py - - store_artifacts: - path: build/linux/sysroot_scripts/sysroots.json - destination: sysroots.json - -workflows: - version: 2.1 - build-and-upload: - jobs: - - build: - image: amd64 - name: build-image-amd64 - - build: - image: i386 - name: build-image-i386 - - build: - image: armhf - name: build-image-armhf - - build: - image: arm64 - name: build-image-arm64 - - build: - image: mipsel - name: build-image-mipsel - - build: - image: mips64el - name: build-image-mips64el - - upload-images: - requires: - - build-image-amd64 - - build-image-i386 - - build-image-armhf - - build-image-arm64 - - build-image-mipsel - - build-image-mips64el diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..7660cf6 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,74 @@ +name: "Build and Upload Sysroots" + +on: + pull_request: + types: + - opened + - synchronize + +permissions: + contents: write + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + name: Build + strategy: + matrix: + arch: [amd64, i386, armhf, arm64, mipsel, mips64el] + runs-on: ubuntu-latest + if: ${{ github.actor != 'github-actions[bot]' }} + steps: + - name: Checkout Repository + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # 4.1.7 + - name: Install Packages + run: | + sudo apt update + sudo apt install -y binutils-arm-linux-gnueabi binutils-arm-linux-gnueabihf binutils-mips64el-linux-gnuabi64 binutils-mipsel-linux-gnu + - name: Install dependencies + run: python3 -m pip install --upgrade requests + - name: Build Sysroot + run: ./build/linux/sysroot_scripts/sysroot_creator.py build ${{ matrix.arch }} + - name: Upload Sysroot Artifact + uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # 4.2.6 + with: + name: debian_bullseye_${{ matrix.arch }}_sysroot.tar.xz + path: out/sysroot-build/bullseye/debian_bullseye_${{ matrix.arch }}_sysroot.tar.xz + upload: + name: Upload Sysroots to Azure + runs-on: ubuntu-latest + if: ${{ github.actor != 'github-actions[bot]' }} + needs: build + env: + SKIP_SYSROOT_BUILD: true + steps: + - name: Checkout Repository + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # 4.1.7 + with: + ref: ${{ github.event.pull_request.head.ref }} + - name: Install dependencies + run: python3 -m pip install --upgrade requests + - name: Download Sysroot Artifacts + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # 4.1.8 + with: + path: out/sysroot-build/bullseye + merge-multiple: true + - name: Upload Sysroots + run: ./build/linux/sysroot_scripts/build_and_upload.py + - name: Upload Sysroot JSON Artifact + uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # 4.2.6 + with: + name: sysroots.json + path: build/linux/sysroot_scripts/sysroots.json + - name: Commit new sysroots.json + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + git config user.name github-actions[bot] + git config user.email 41898282+github-actions[bot]@users.noreply.github.com + git add build/linux/sysroot_scripts/sysroots.json + git commit -m "chore: update sysroots.json" + git push origin ${GITHUB_HEAD_REF}