kolibrios-gcc-toolchain/.github/workflows/test.yml

130 lines
3.2 KiB
YAML
Raw Normal View History

name: Test
2024-11-07 04:19:54 +01:00
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
2024-11-07 04:19:54 +01:00
workflow_dispatch:
jobs:
2024-11-09 13:24:35 +01:00
#Test linux install script
2024-11-07 13:38:42 +01:00
linux-install:
2024-11-07 04:19:54 +01:00
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run script
2024-11-09 18:35:08 +01:00
run: echo '/home/autobuild/tools' | ${{ github.workspace }}/./install.sh
2024-11-07 04:19:54 +01:00
- name: Add toolchain to path
2024-11-07 04:27:35 +01:00
run: echo "/home/autobuild/tools/win32/bin" >> $GITHUB_PATH
2024-11-07 04:26:12 +01:00
- name: Test run
2024-11-07 04:19:54 +01:00
run: |
kos32-gcc -v
kos32-g++ -v
#Test Batch install script
batch-install:
2024-11-07 13:38:42 +01:00
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Install depends
run: |
choco install wget
choco install 7zip
2024-11-07 13:38:42 +01:00
- name: Run script
run: ${{ github.workspace }}\install.bat
#Test PowerShell install script
PowerShell-install:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Run script
run: ${{ github.workspace }}\install.ps1
2024-11-07 13:38:42 +01:00
2024-11-09 13:24:35 +01:00
#Test Windows Installer
2024-11-08 16:33:38 +01:00
build-Installer:
2024-11-08 17:57:58 +01:00
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
2024-11-08 16:33:38 +01:00
- name: Build
run: |
cmake -B ${{ github.workspace }}/build
cmake --build ${{ github.workspace }}/build --target Installer
- name: Upload artifact
2024-11-09 19:01:24 +01:00
uses: actions/upload-artifact@v4
with:
2024-11-09 19:01:24 +01:00
name: windows-installer
# Upload entire repository
2024-11-09 19:01:24 +01:00
path: './build/installer.exe'
2024-11-09 13:24:35 +01:00
# Test Package
deb-package:
2024-11-08 16:33:38 +01:00
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: |
cmake -B ${{ github.workspace }}/build
cmake --build ${{ github.workspace }}/build --target deb
2024-11-09 18:27:22 +01:00
- name: Upload artifact
2024-11-09 19:02:36 +01:00
uses: actions/upload-artifact@v4
2024-11-09 18:27:22 +01:00
with:
name: deb-package
2024-11-09 18:27:22 +01:00
# Upload entire repository
2024-11-09 19:01:24 +01:00
path: './build/package.deb'
2024-11-08 16:33:38 +01:00
- name: Install package
2024-11-10 12:21:02 +01:00
run: echo '/kolibrios-toolchain' | sudo apt install ${{ github.workspace }}/build/package.deb -y
2024-11-08 16:33:38 +01:00
2024-11-08 13:02:51 +01:00
- name: Add toolchain to path
2024-11-10 12:27:46 +01:00
run: echo "/kolibrios-toolchain/win32/bin" >> $GITHUB_PATH
2024-11-08 16:33:38 +01:00
2024-11-09 13:16:41 +01:00
- name: Test run
run: |
kos32-g++ -v
kos32-gcc -v
2024-11-10 12:21:02 +01:00
/home/autobuild/tools/win32/bin/kos32-gcc -v
/home/autobuild/tools/win32/bin/kos32-g++ -v
/kolibrios-toolchain/win32/bin/kos32-gcc -v
/kolibrios-toolchain/win32/bin/kos32-g++ -v
2024-11-09 13:16:41 +01:00
- name: Remove package
run: sudo apt remove kos32-gcc
#Test chocolatey package
chocolatey-package:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: |
cmake -B ${{ github.workspace }}/build
cmake --build ${{ github.workspace }}/build --target choco
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: choco-package
# Upload entire repository
path: './build/choco-package.nupkg'
- name: Install package
run: choco install ${{ github.workspace }}\build\choco-package.nupkg
- name: Remove package
run: choco uninstall kos32-gcc