From 23526ed5ccc333419f83bc9aec37f2ac54cdc4e1 Mon Sep 17 00:00:00 2001 From: James Haywood Date: Tue, 23 Apr 2024 13:30:51 -0400 Subject: [PATCH] Fix workflows Split off publish job --- .github/workflows/publish.yml | 68 +++++++++++++++++++++++++++++++++++ .github/workflows/rust.yml | 64 +-------------------------------- README.md | 5 ++- 3 files changed, 73 insertions(+), 64 deletions(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..113e735 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,68 @@ +name: Publish + +on: + push: + tags: + - "v*.*.*" + workflow_dispatch: + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - os: macos-latest + TARGET: aarch64-apple-darwin + + - os: macos-latest + TARGET: x86_64-apple-darwin + + - os: ubuntu-latest + TARGET: arm-unknown-linux-musleabihf + + - os: ubuntu-latest + TARGET: armv7-unknown-linux-musleabihf + + - os: ubuntu-latest + TARGET: x86_64-unknown-linux-musl + + - os: windows-latest + TARGET: x86_64-pc-windows-msvc + EXTENSION: .exe + + steps: + - name: Building ${{ matrix.TARGET }} + run: echo "${{ matrix.TARGET }}" + + - uses: actions/checkout@master + - uses: actions-rs/toolchain@v1.0.1 + with: + toolchain: stable + target: ${{ matrix.TARGET }} + override: true + + - uses: actions-rs/cargo@v1 + with: + use-cross: true + command: build + args: --verbose --release --target=${{ matrix.TARGET }} + + - name: Rename + run: cp target/${{ matrix.TARGET }}/release/deduct${{ matrix.EXTENSION }} deduct-${{ matrix.TARGET }}${{ matrix.EXTENSION }} + + - uses: actions/upload-artifact@master + with: + name: deduct-${{ matrix.TARGET }}${{ matrix.EXTENSION }} + path: deduct-${{ matrix.TARGET }}${{ matrix.EXTENSION }} + + - uses: svenstaro/upload-release-action@v2 + name: Upload binaries to release + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: deduct-${{ matrix.TARGET }}${{ matrix.EXTENSION }} + asset_name: deduct-${{ matrix.TARGET }}${{ matrix.EXTENSION }} + tag: ${{ github.ref }} + prerelease: ${{ !startsWith(github.ref, 'refs/tags/') }} + overwrite: true \ No newline at end of file diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index bef673f..d03518a 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -4,8 +4,7 @@ on: [push, pull_request, workflow_dispatch] env: CARGO_TERM_COLOR: always - RUSTFLAGS: -D warnings --cfg=web_sys_unstable_apis - RUSTDOCFLAGS: -D warnings + RUSTFLAGS: --cfg=web_sys_unstable_apis jobs: check: @@ -54,64 +53,3 @@ jobs: with: command: test args: --lib - - build: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - include: - - os: macos-latest - TARGET: aarch64-apple-darwin - - - os: macos-latest - TARGET: x86_64-apple-darwin - - - os: ubuntu-latest - TARGET: arm-unknown-linux-musleabihf - - - os: ubuntu-latest - TARGET: armv7-unknown-linux-musleabihf - - - os: ubuntu-latest - TARGET: x86_64-unknown-linux-musl - - - os: windows-latest - TARGET: x86_64-pc-windows-msvc - EXTENSION: .exe - - steps: - - name: Building ${{ matrix.TARGET }} - run: echo "${{ matrix.TARGET }}" - - - uses: actions/checkout@master - - uses: actions-rs/toolchain@v1.0.1 - with: - toolchain: stable - target: ${{ matrix.TARGET }} - override: true - - - uses: actions-rs/cargo@v1 - with: - use-cross: true - command: build - args: --verbose --release --target=${{ matrix.TARGET }} - - - name: Rename - run: cp target/${{ matrix.TARGET }}/release/eframe_template${{ matrix.EXTENSION }} eframe_template-${{ matrix.TARGET }}${{ matrix.EXTENSION }} - - - uses: actions/upload-artifact@master - with: - name: eframe_template-${{ matrix.TARGET }}${{ matrix.EXTENSION }} - path: eframe_template-${{ matrix.TARGET }}${{ matrix.EXTENSION }} - - - uses: svenstaro/upload-release-action@v2 - name: Upload binaries to release - if: ${{ github.event_name == 'push' }} - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: eframe_template-${{ matrix.TARGET }}${{ matrix.EXTENSION }} - asset_name: eframe_template-${{ matrix.TARGET }}${{ matrix.EXTENSION }} - tag: ${{ github.ref }} - prerelease: ${{ !startsWith(github.ref, 'refs/tags/') }} - overwrite: true diff --git a/README.md b/README.md index 39b1e12..ea902b6 100644 --- a/README.md +++ b/README.md @@ -41,4 +41,7 @@ cargo install --locked --git https://github.com/Colonial-Dev/deduct --branch mas ## Design -## Acknowledgements \ No newline at end of file +## Acknowledgements +Thank you to: +- Dr. Sharon Berry, for inspiring me to do this project and an excellent semester in P251 +- Keven Klement and the Open Logic Project, for their excellent textbook and [proof checker](https://proofs.openlogicproject.org) \ No newline at end of file