WIP: Set ucrt
as default runtime library
#727
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 main toolchain | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
inputs: | |
binutils_branch: | |
description: 'Binutils branch to build' | |
required: false | |
default: 'woarm64-cygwin' | |
gcc_branch: | |
description: 'GCC branch to build' | |
required: false | |
default: 'fix-va-list-ucrt' | |
mingw_branch: | |
description: 'Mingw branch to build' | |
required: false | |
default: 'woarm64-cygwin' | |
env: | |
BINUTILS_BRANCH: ${{ inputs.binutils_branch || 'woarm64-cygwin' }} | |
GCC_BRANCH: ${{ inputs.gcc_branch || 'fix-va-list-ucrt' }} | |
MINGW_BRANCH: ${{ inputs.mingw_branch || 'woarm64-cygwin' }} | |
BUILD_PATH: ${{ github.workspace }}/build | |
CCACHE_DIR_PATH: ${{ github.workspace }}/ccache | |
TOOLCHAIN_PATH: ${{ github.workspace }}/cross | |
CCACHE: 1 | |
DELETE_BUILD: 1 | |
jobs: | |
build-toolchain: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Get cache key | |
id: get-cache-key | |
run: | | |
echo "timestamp=$(date -u --iso-8601=seconds)" >> "$GITHUB_OUTPUT" | |
- name: Restore Ccache | |
uses: actions/cache/restore@v4 | |
with: | |
path: ${{ env.CCACHE_DIR_PATH }} | |
key: main-gcc-ccache-${{ steps.get-cache-key.outputs.timestamp }} | |
restore-keys: main-gcc-ccache- | |
- name: Run Build | |
run: | | |
./build.sh | |
- name: Build tests | |
run: | | |
.github/scripts/tests/build.sh | |
- name: Save Ccache | |
if: always() | |
uses: actions/cache/save@v4 | |
with: | |
path: ${{ env.CCACHE_DIR_PATH }} | |
key: main-gcc-ccache-${{ steps.get-cache-key.outputs.timestamp }} | |
- name: Upload build folder | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: main-aarch64-w64-mingw32-build | |
retention-days: 1 | |
path: ${{ env.BUILD_PATH }} | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: main-aarch64-w64-mingw32-toolchain | |
path: ${{ env.TOOLCHAIN_PATH }} | |
retention-days: 1 |