-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build and test
aarch64-w64-mingw32
toolchain using MSYS2 MinGW cros…
…s-compilation toolchain
- Loading branch information
Showing
11 changed files
with
178 additions
and
36 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
source `dirname ${BASH_SOURCE[0]}`/config.sh | ||
|
||
if ! [ -z "$GITHUB_WORKSPACE" ]; then | ||
echo "CCACHE_DIR=`cygpath "$GITHUB_WORKSPACE"`/ccache" >> "$GITHUB_ENV" | ||
echo "timestamp=$(date -u --iso-8601=seconds)" >> "$GITHUB_OUTPUT" | ||
fi | ||
|
||
if [ -d /usr/lib/ccache/bin ]; then | ||
echo "::group::Add aarch64 toolchain to ccache" | ||
pushd /usr/lib/ccache/bin/ | ||
ln -sf /usr/bin/ccache aarch64-w64-mingw32-gcc | ||
ln -sf /usr/bin/ccache aarch64-w64-mingw32-g++ | ||
ln -sf /usr/bin/ccache aarch64-w64-mingw32-c++ | ||
popd | ||
|
||
ln -sf /opt/bin/$BUILD-gcc /opt/$BUILD/bin/gcc | ||
ln -sf /opt/bin/$BUILD-gcc-ar /opt/$BUILD/bin/gcc-ar | ||
ln -sf /opt/bin/$BUILD-g++ /opt/$BUILD/bin/g++ | ||
ln -sf /usr/bin/true /opt/$BUILD/bin/makeinfo | ||
echo "::endgroup::" | ||
fi |
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ on: | |
push: | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_dispatch: | ||
inputs: | ||
binutils_branch: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ on: | |
push: | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_dispatch: | ||
inputs: | ||
binutils_branch: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
name: Build and test GCC | ||
|
||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
inputs: | ||
binutils_branch: | ||
description: 'Binutils branch to build' | ||
required: false | ||
default: 'woarm64' | ||
gcc_branch: | ||
description: 'GCC branch to build' | ||
required: false | ||
default: 'woarm64' | ||
mingw_branch: | ||
description: 'Mingw branch to build' | ||
required: false | ||
default: 'woarm64' | ||
|
||
env: | ||
BINUTILS_REPO: Windows-on-ARM-Experiments/binutils-woarm64 | ||
BINUTILS_BRANCH: ${{ inputs.binutils_branch }} | ||
BINUTILS_VERSION: binutils | ||
|
||
GCC_REPO: Windows-on-ARM-Experiments/gcc-woarm64 | ||
GCC_BRANCH: ${{ inputs.gcc_branch }} | ||
GCC_VERSION: gcc | ||
|
||
MINGW_REPO: Windows-on-ARM-Experiments/mingw-woarm64 | ||
MINGW_BRANCH: ${{ inputs.mingw_branch }} | ||
MINGW_VERSION: mingw-w64-master | ||
|
||
jobs: | ||
build-and-test: | ||
runs-on: windows-latest | ||
|
||
defaults: | ||
run: | ||
shell: msys2 {0} | ||
|
||
env: | ||
BUILD: x86_64-w64-mingw32 | ||
ARCH: x86_64 | ||
PLATFORM: w64-mingw32 | ||
CRT: msvcrt | ||
|
||
steps: | ||
- uses: msys2/setup-msys2@v2 | ||
with: | ||
msystem: MINGW64 | ||
install: git mingw-w64-cross-gcc mingw-w64-cross-zlib make flex bison ccache zlib-devel dejagnu | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Checkout binutils | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ env.BINUTILS_REPO }} | ||
ref: ${{ env.BINUTILS_BRANCH }} | ||
path: ${{ github.workspace }}/code/${{ env.BINUTILS_VERSION }} | ||
|
||
- name: Checkout GCC | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ env.GCC_REPO }} | ||
ref: ${{ env.GCC_BRANCH }} | ||
path: ${{ github.workspace }}/code/${{ env.GCC_VERSION }} | ||
|
||
- name: Checkout MinGW | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ env.MINGW_REPO }} | ||
ref: ${{ env.MINGW_BRANCH }} | ||
path: ${{ github.workspace }}/code/${{ env.MINGW_VERSION }} | ||
|
||
- name: Enable Ccache | ||
id: enable-ccache | ||
run: | | ||
.github/scripts/enable-ccache.sh | ||
- name: Restore Ccache | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: ${{ github.workspace }}/ccache | ||
key: test-gcc-ccache-${{ steps.enable-ccache.outputs.timestamp }} | ||
restore-keys: test-gcc-ccache- | ||
|
||
- name: Build toolchain | ||
run: | | ||
.github/scripts/build.sh | ||
- name: Execute GCC tests | ||
run: | | ||
.github/scripts/toolchain/execute-gcc-tests.sh | ||
- name: Save Ccache | ||
if: always() | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: ${{ github.workspace }}/ccache | ||
key: test-gcc-ccache-${{ steps.enable-ccache.outputs.timestamp }} | ||
|
||
- name: Compress build folder | ||
if: failure() | ||
run: | | ||
tar -czf build.tar.gz build-*/* | ||
- name: Upload build folder | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: build | ||
retention-days: 1 | ||
path: build.tar.gz |