PC #332
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
name: PC | |
on: | |
push: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 3 * * *' | |
jobs: | |
win32: | |
runs-on: windows-2019 | |
strategy: | |
matrix: | |
win_bits: ["32bit", "64bit"] | |
fail-fast: true | |
steps: | |
- uses: actions/checkout@v4 | |
- name: install xmake | |
run: | | |
Invoke-Expression (Invoke-Webrequest 'https://xmake.io/psget.text' -UseBasicParsing).Content | |
- name: clone LuatOS | |
run: | | |
cd .. | |
git clone https://github.com/openLuat/LuatOS.git | |
- name: build | |
env: | |
WINBITS: ${{ matrix.win_bits }} | |
run: | | |
$env:path+=";C:\Users\runneradmin\xmake;" | |
cmd /c build_windows_${env:WINBITS}_msvc.bat | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: luatos_win_${{ matrix.win_bits }} | |
path: build/out | |
linux: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
linux_bits: ["32bit"] | |
fail-fast: true | |
steps: | |
- uses: actions/checkout@v4 | |
- name: prepare software | |
run: | | |
sudo apt-get update | |
sudo apt install git gcc-multilib libc6 libgcc1 libstdc++5 libstdc++6 p7zip-full binutils llvm libsdl2-dev -y | |
sudo apt install libncurses5-dev cmake -y | |
sudo add-apt-repository ppa:xmake-io/xmake -y | |
sudo apt update | |
sudo apt install xmake | |
- name: clone LuatOS | |
run: | | |
cd .. | |
git clone https://github.com/openLuat/LuatOS.git | |
- name: build | |
env: | |
LINUX_BITS: ${{ matrix.linux_bits }} | |
run: | | |
sh build_linux_${LINUX_BITS}.sh | |
- name: Tar files | |
env: | |
LINUX_BITS: ${{ matrix.linux_bits }} | |
run: tar -cvf luatos_linux_${LINUX_BITS}.tar build/out | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: luatos_linux_${{ matrix.linux_bits }} | |
path: luatos_linux_${{ matrix.linux_bits }}.tar | |
# macos: | |
# runs-on: macos-12 | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - name: prepare software | |
# run: | | |
# brew install git xmake libtool | |
# - name: clone LuatOS | |
# run: | | |
# cd .. | |
# git clone https://github.com/openLuat/LuatOS.git | |
# - name: build | |
# run: | | |
# xmake -w -y | |
# - name: Tar files | |
# run: tar -cvf luatos_osx.tar build/out | |
# - name: Upload artifact | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# name: luatos_osx | |
# path: luatos_osx.tar |