Skip to content

Commit

Permalink
Try a build action
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinmera committed Nov 28, 2024
1 parent e7e58eb commit fb9fa9e
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Build Library
on: [create, workflow_dispatch]

jobs:
build-posix:
runs-on: [ubuntu-22.04, macos-12]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Compile
run: |
sudo apt-get install -yy cmake
CMAKEFLAGS="-DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=ReleaseWithDebug" make install
- name: Bundle
run: |
cd install
zip -r ~/libmixed-{{ runner.os }}.zip *
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: libmixed-${{ runner.os }}
path: ~/libmixed-${{ runner.os }}.zip
- name: Create release
id: create_release
uses: ncipollo/release-action@v1
continue-on-error: true
with:
allowUpdates: true
name: Release ${{ github.ref_name }}
artifacts: ~/libmixed-${{ runner.os }}.zip
build-windows:
runs-on: [windows-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
install: >-
git
curl
make
pacboy: >-
toolchain:p
cmake:p
- name: Compile
shell: msys2 {0}
run: |
CMAKEFLAGS="-DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=ReleaseWithDebug" make install
- name: Bundle
shell: powershell
run: |
cd install
Compress-Archive -Path * -Destination $HOME/libmixed-${{ runner.os }}.zip
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: libmixed-${{ runner.os }}
path: ~/libmixed-${{ runner.os }}.zip
- name: Create release
id: create_release
uses: ncipollo/release-action@v1
continue-on-error: true
with:
allowUpdates: true
name: Release ${{ github.ref_name }}
artifacts: ~/libmixed-${{ runner.os }}.zip

0 comments on commit fb9fa9e

Please sign in to comment.