fix: GitHub sysroots url fetching #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Build and Upload Sysroots" | |
on: | |
push: | |
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] | |
fail-fast: false | |
runs-on: ubuntu-latest | |
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 | |
needs: build | |
environment: production | |
if: github.ref == 'refs/heads/bullseye' | |
env: | |
AZURE_STORAGE_SAS_TOKEN: ${{ secrets.AZURE_STORAGE_SAS_TOKEN }} | |
AZURE_STORAGE_ACCOUNT: ${{ secrets.AZURE_STORAGE_ACCOUNT }} | |
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: Download sysroots.json from Electron | |
run: | | |
json_url="https://raw.githubusercontent.com/electron/electron/main/script/sysroots.json" | |
curl --output build/linux/sysroot_scripts/sysroots.json $json_url -H "Accept: application/json" | |
az extension add --name storage-preview | |
- name: Upload Sysroots to Azure | |
run: ./build/linux/sysroot_scripts/build_and_upload.py --upload | |
- name: Upload Sysroot JSON Artifact | |
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # 4.2.6 | |
with: | |
name: sysroots.json | |
path: build/linux/sysroot_scripts/sysroots.json |