2024-11-15 17:45:10 +01:00
|
|
|
name: Test
|
2024-11-07 04:19:54 +01:00
|
|
|
|
|
|
|
on:
|
2024-11-07 15:45:03 +01:00
|
|
|
push:
|
|
|
|
branches: [ "main" ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ "main" ]
|
2024-11-07 04:19:54 +01:00
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
2024-11-15 17:45:10 +01:00
|
|
|
|
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
|
|
|
|
2024-11-07 16:29:01 +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
|
|
|
|
2024-11-07 16:29:01 +01:00
|
|
|
- name: Test run
|
2024-11-07 04:19:54 +01:00
|
|
|
run: |
|
|
|
|
kos32-gcc -v
|
|
|
|
kos32-g++ -v
|
2024-11-07 16:29:01 +01:00
|
|
|
|
2024-11-15 17:45:10 +01:00
|
|
|
#Test Batch install script
|
|
|
|
batch-install:
|
2024-11-07 13:38:42 +01:00
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
2024-11-07 16:19:35 +01:00
|
|
|
|
|
|
|
- name: Install depends
|
|
|
|
run: |
|
|
|
|
choco install wget
|
|
|
|
choco install 7zip
|
2024-11-07 13:38:42 +01:00
|
|
|
|
|
|
|
- name: Run script
|
2024-11-15 17:45:10 +01:00
|
|
|
run: ${{ github.workspace }}\install.bat
|
|
|
|
|
|
|
|
#Test PowerShell install script
|
|
|
|
PowerShell-install:
|
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
2024-11-17 12:28:13 +01:00
|
|
|
- name: Install modules
|
|
|
|
run: |
|
|
|
|
Set-PSRepository PSGallery -InstallationPolicy Trusted
|
|
|
|
Install-Module -Name 7Zip4PowerShell
|
|
|
|
|
2024-11-15 17:45:10 +01:00
|
|
|
- name: Run script
|
|
|
|
run: ${{ github.workspace }}\install.ps1
|
2024-11-07 13:38:42 +01:00
|
|
|
|
2024-11-17 16:42:28 +01:00
|
|
|
- name: Test
|
|
|
|
run: |
|
|
|
|
kos32-gcc -v
|
|
|
|
kos32-g++ -v
|
|
|
|
|
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
|
2024-11-16 16:23:38 +01:00
|
|
|
needs: PowerShell-install
|
2024-11-08 12:50:40 +01:00
|
|
|
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
|
2024-11-08 12:50:40 +01:00
|
|
|
|
2024-11-09 18:21:40 +01:00
|
|
|
- name: Upload artifact
|
2024-11-09 19:01:24 +01:00
|
|
|
uses: actions/upload-artifact@v4
|
2024-11-09 18:21:40 +01:00
|
|
|
with:
|
2024-11-09 19:01:24 +01:00
|
|
|
name: windows-installer
|
2024-11-09 18:21:40 +01:00
|
|
|
# Upload entire repository
|
2024-11-09 19:01:24 +01:00
|
|
|
path: './build/installer.exe'
|
2024-11-09 18:21:40 +01:00
|
|
|
|
2024-11-16 16:23:38 +01:00
|
|
|
# Test deb package build
|
|
|
|
deb-package-build:
|
2024-11-08 16:33:38 +01:00
|
|
|
runs-on: ubuntu-latest
|
2024-11-16 16:23:38 +01:00
|
|
|
needs: linux-install
|
2024-11-08 16:33:38 +01:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
cmake -B ${{ github.workspace }}/build
|
2024-11-16 15:56:36 +01:00
|
|
|
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:
|
2024-11-14 17:26:34 +01:00
|
|
|
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-16 16:23:38 +01:00
|
|
|
|
|
|
|
# Test deb package install/remove
|
|
|
|
deb-package-test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: deb-package-build
|
|
|
|
steps:
|
2024-11-17 12:58:05 +01:00
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
cmake -B ${{ github.workspace }}/build
|
|
|
|
cmake --build ${{ github.workspace }}/build --target deb
|
|
|
|
|
2024-11-08 12:50:40 +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
|
2024-11-09 18:21:40 +01:00
|
|
|
|
2024-11-16 16:23:38 +01:00
|
|
|
#Test chocolatey package build
|
|
|
|
chocolatey-package-build:
|
2024-11-14 17:26:34 +01:00
|
|
|
runs-on: windows-latest
|
2024-11-16 16:23:38 +01:00
|
|
|
needs: PowerShell-install
|
2024-11-14 17:26:34 +01:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
cmake -B ${{ github.workspace }}/build
|
2024-11-16 15:56:36 +01:00
|
|
|
cmake --build ${{ github.workspace }}/build --target choco
|
2024-11-14 17:26:34 +01:00
|
|
|
|
|
|
|
- name: Upload artifact
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: choco-package
|
|
|
|
# Upload entire repository
|
2024-11-16 15:56:36 +01:00
|
|
|
path: './build/choco-package.nupkg'
|
|
|
|
|
2024-11-16 16:23:38 +01:00
|
|
|
# Test chocolatey package install/remove
|
|
|
|
chocolatey-package-test:
|
2024-11-17 16:42:28 +01:00
|
|
|
runs-on: windows-latest
|
2024-11-16 16:23:38 +01:00
|
|
|
needs: chocolatey-package-build
|
|
|
|
steps:
|
2024-11-17 12:58:05 +01:00
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Install modules
|
|
|
|
run: |
|
|
|
|
Set-PSRepository PSGallery -InstallationPolicy Trusted
|
|
|
|
Install-Module -Name 7Zip4PowerShell
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
cmake -B ${{ github.workspace }}/build
|
|
|
|
cmake --build ${{ github.workspace }}/build --target choco
|
|
|
|
|
2024-11-16 15:56:36 +01:00
|
|
|
- name: Install package
|
|
|
|
run: choco install ${{ github.workspace }}\build\choco-package.nupkg
|
|
|
|
|
|
|
|
- name: Remove package
|
|
|
|
run: choco uninstall kos32-gcc
|
2024-11-16 16:23:38 +01:00
|
|
|
|