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

106 lines
2.6 KiB
YAML
Raw Normal View History

2024-11-07 04:19:54 +01:00
name: test
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
2024-11-09 13:24:35 +01:00
#Test windows install script
2024-11-07 13:38:42 +01:00
windows-install:
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
- name: Add toolchain to path
2024-11-07 16:38:27 +01:00
run: echo "C:\MinGW\msys\1.0\home\autobuild\tools\win32\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
2024-11-07 13:38:42 +01:00
- name: Test run
2024-11-07 13:38:42 +01:00
run: |
kos32-g++ -v
2024-11-08 08:45:07 +01:00
kos32-gcc -v
shell: cmd
2024-11-07 04:19:54 +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
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 Package
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-09 19:01:24 +01:00
name: 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
run: echo "/home/autobuild/tools/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