Skip to content

Commit

Permalink
Fix workflows
Browse files Browse the repository at this point in the history
Split off publish job
  • Loading branch information
Colonial-Dev committed Apr 23, 2024
1 parent b0e4828 commit 23526ed
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 64 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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
64 changes: 1 addition & 63 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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/[email protected]
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
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,7 @@ cargo install --locked --git https://github.com/Colonial-Dev/deduct --branch mas

## Design

## Acknowledgements
## 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)

0 comments on commit 23526ed

Please sign in to comment.