ci: merge all workflows into one

This commit is contained in:
Anonymous Maarten
2024-07-17 00:26:04 +02:00
committed by Anonymous Maarten
parent 3374e57102
commit da8aa84c1d
22 changed files with 1042 additions and 1268 deletions

View File

@@ -0,0 +1,49 @@
name: 'Setup libusb for MSBC'
description: 'Greet someone'
inputs:
version:
description: 'LoongArch64 version'
default: '2022.09.06'
outputs:
prefix:
description: "LoongArch toolchain prefix"
value: ${{ steps.final.outputs.prefix }}
cc:
description: "LoongArch C compiler"
value: ${{ steps.final.outputs.cc }}
cxx:
description: "LoongArch C++ compiler"
value: ${{ steps.final.outputs.cxx }}
runs:
using: 'composite'
steps:
- uses: actions/cache/restore@v4
id: restore-cache
with:
path: /opt/cross-tools
key: loongarch64-${{ matrix.platform.toolchain-version }}
- name: 'Download LoongArch64 gcc+glibc toolchain'
if: ${{ !steps.restore-cache.outputs.cache-hit }}
shell: bash
run: |
url="https://github.com/loongson/build-tools/releases/download/${{ matrix.platform.toolchain-version }}/loongarch64-clfs-6.3-cross-tools-gcc-glibc.tar.xz"
wget "$url" -O /tmp/toolchain.tar.xz
mkdir -p /opt
tar -C /opt -x -f /tmp/toolchain.tar.xz
- uses: actions/cache/save@v4
if: ${{ !steps.restore-cache.outputs.cache-hit }}
with:
path: /opt/cross-tools
key: loongarch64-${{ matrix.platform.toolchain-version }}
- name: 'Set output vars'
id: final
shell: bash
run: |
prefix=/opt/cross-tools
echo "prefix=${prefix}" >> $GITHUB_OUTPUT
echo "cc=${prefix}/bin/loongarch64-unknown-linux-gnu-gcc" >> $GITHUB_OUTPUT
echo "cxx=${prefix}/bin/loongarch64-unknown-linux-gnu-g++" >> $GITHUB_OUTPUT

View File

@@ -1,5 +1,5 @@
name: 'Setup libusb for MSBC'
description: 'Greet someone'
name: 'Setup libusb for MSVC'
description: 'Setup libusb for MSVC'
inputs:
version:
description: 'libusb version'
@@ -68,3 +68,4 @@ runs:
exit 1
}
echo "root=${libusb_incdir};${libusb_libdir}" >> $env:GITHUB_OUTPUT
echo "LibUSB_ROOT=${libusb_incdir};${libusb_libdir}" >> $env:GITHUB_ENV