diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..65bde28 --- /dev/null +++ b/.github/workflows/build.yml @@ -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