Skip to content

Commit

Permalink
linux actions
Browse files Browse the repository at this point in the history
  • Loading branch information
maniospas committed Nov 1, 2024
1 parent 97b860a commit 034c1ae
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 44 deletions.
79 changes: 50 additions & 29 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,55 +11,74 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
os: [windows-latest, ubuntu-latest]
include:
# Windows Configuration
- os: windows-latest
triplet: x64-windows
build-script: .\vcpkg\bootstrap-vcpkg.bat
cmake-command: |
cmake -B ./build
cmake --build ./build --config Release
package-command: |
mkdir release
copy .\build\Release\*.exe release\ || echo "No executables found"
copy .\build\Release\*.dll release\ || echo "No DLLs found"
copy .\libs\* release\ || echo "No libs directory found"
powershell Compress-Archive -Path release\* -DestinationPath windows_release.zip
artifact-name: windows-build
artifact-path: windows_release.zip
# Linux Configuration
- os: ubuntu-latest
triplet: x64-linux
build-script: ./vcpkg/bootstrap-vcpkg.sh
cmake-command: |
cmake -B ./build
cmake --build ./build --config Release
package-command: |
mkdir release
cp ./build/* release/ || echo "No executables found"
cp ./build/*.so release/ || echo "No shared libraries found"
cp -r libs/ release/ || echo "No libs directory found"
tar -czvf linux_release.tar.gz -C release .
artifact-name: linux-build
artifact-path: linux_release.tar.gz

steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v3

- name: Install vcpkg
run: |
git clone https://github.com/microsoft/vcpkg.git
${{ matrix.build-script }}
- name: Install vcpkg
run: |
git clone https://github.com/microsoft/vcpkg.git
${{ matrix.build-script }}
- name: Install dependencies
run: |
./vcpkg/vcpkg install crow civetweb zlib --triplet=${{ matrix.triplet }}
- name: Install dependencies
run: |
./vcpkg/vcpkg install crow civetweb zlib --triplet=${{ matrix.triplet }}
- name: Configure and build
run: |
${{ matrix.cmake-command }}
- name: Configure and build
run: |
${{ matrix.cmake-command }}
- name: Package executable for Windows
run: |
mkdir -p release
cp ./*.exe release/ || echo "No executables found"
cp ./*.dll release/ || echo "No DLLs found"
cp -r libs/ release/ || echo "No libs directory found"
# Use PowerShell's Compress-Archive for zipping files on Windows
powershell Compress-Archive -Path release/* -DestinationPath windows_release.zip
- name: Package executable
run: |
${{ matrix.package-command }}
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: windows-build
path: windows_release.zip
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.artifact-name }}
path: ${{ matrix.artifact-path }}

release:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download Windows build artifact
- name: Download build artifacts
uses: actions/download-artifact@v3
with:
name: windows-build
name: '**-build'
path: .

- name: List downloaded files (Debugging step)
Expand All @@ -68,6 +87,8 @@ jobs:
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: windows_release.zip
files: |
windows_release.zip
linux_release.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
7 changes: 2 additions & 5 deletions main.bb
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,5 @@ final functors(n) = {
}


a = try {
values = functors("abc");
}
catch(a)
print("found an error");
catch(try values = functors("abc"))
print("found an error");
20 changes: 10 additions & 10 deletions main.bbvm
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@ return # ret
END
IS functors _bb10
final # functors
BEGIN _bb33
BEGIN _bb35
BUILTIN _bb36 "abc"
list args _bb36
END
call values _bb35 functors
BEGIN _bb31
BUILTIN _bb32 "found an error"
print # _bb32
END
try a _bb33
BEGIN _bb35
BEGIN _bb37
BUILTIN _bb38 "found an error"
print # _bb38
BUILTIN _bb38 "abc"
list args _bb38
END
call values _bb37 functors
END
catch # a _bb37
try _bb33 _bb35
catch # _bb33 _bb31

0 comments on commit 034c1ae

Please sign in to comment.