Skip to content

Commit

Permalink
build: switch to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Aug 9, 2024
1 parent d3ebb27 commit 7ce58e7
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 93 deletions.
93 changes: 0 additions & 93 deletions .circleci/config.yml

This file was deleted.

72 changes: 72 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
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 != 'sysroot-updater' }}
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 != 'sysroot-updater' }}
needs: build
env:
SKIP_SYSROOT_BUILD: true
steps:
- name: Checkout Repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # 4.1.7
- 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 sysroot-updater
git config user.email [email protected]
git add build/linux/sysroot_scripts/sysroots.json
git commit -m "chore: update sysroots.json"
git push origin ${GITHUB_HEAD_REF}

0 comments on commit 7ce58e7

Please sign in to comment.