Skip to content

Update cross-compilation toolchain to the new upstream packages #308

Update cross-compilation toolchain to the new upstream packages

Update cross-compilation toolchain to the new upstream packages #308

Workflow file for this run

name: Build MinGW and MSYS2 toolchains
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
inputs:
msys2_packages_branch:
description: "MSYS2-packages branch to build"
type: string
required: false
default: "woarm64"
jobs:
mingw-cross-toolchain:
name: MinGW cross-compilation toolchain
uses: ./.github/workflows/mingw-cross-toolchain.yml
with:
msys2_packages_branch: ${{ inputs.msys2_packages_branch || 'woarm64' }}
repository:
name: Create MSYS2 repository
needs: mingw-cross-toolchain
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: MSYS
update: true
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: |
pacman -S --noconfirm \
git \
mingw-w64-x86_64-github-cli \
mingw-w64-x86_64-jq
- name: Download artifacts
run: |
`cygpath "${{ github.workspace }}"`/.github/scripts/download-artifacts.sh ${{ github.run_id }} \
'${{ needs.mingw-cross-toolchain.outputs.artifacts }}'
- name: Setup MSYS2 packages repository
run: |
mkdir aarch64
mkdir x86_64
mv -f *-x86_64.pkg.tar.zst x86_64/
cd x86_64
repo-add woarm64.db.tar.gz *.pkg.tar.zst
- name: Create index.html
run: |
echo "<!DOCTYPE html><head></head><body></body>" > index.html
- name: Upload woarm64-msys2-repository
uses: actions/upload-pages-artifact@v3
with:
name: woarm64-msys2-repository
retention-days: 1
path: "."
deploy:
if: github.ref == 'refs/heads/main'
name: Deploy MSYS2 repository
needs: repository
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{steps.deployment.outputs.page_url}}
defaults:
run:
shell: bash {0}
steps:
- name: Setup GitHub Pages
uses: actions/configure-pages@v4
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
with:
artifact_name: woarm64-msys2-repository
check:
name: Check MSYS2 repository
needs: deploy
uses: ./.github/workflows/check-repository.yml