Skip to content

Commit

Permalink
fix actions
Browse files Browse the repository at this point in the history
  • Loading branch information
biezhihua committed Feb 8, 2024
1 parent d1b67ca commit a90da12
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 20 deletions.
20 changes: 0 additions & 20 deletions .github/workflows/rust.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/rust_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# .github/workflows/build.yml
name: Build

on:
push:
branches: [main]

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:

# Checkout the repository
- uses: actions/checkout@master

# Set up the Rust toolchain
- name: Run tests
run: cd ./soda_resource_tools_lib && cargo build && cargo test -- --test-threads=1

# Compile the project
- name: Compile
id: compile
uses: rust-build/[email protected]
with:
RUSTTARGET: x86_64-unknown-linux-musl
UPLOAD_MODE: none

# Upload the artifact
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: Binary
path: |
${{ steps.compile.outputs.BUILT_ARCHIVE }}
${{ steps.compile.outputs.BUILT_CHECKSUM }}
29 changes: 29 additions & 0 deletions .github/workflows/rust_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# .github/workflows/release.yml

on:
release:
types: [created]

jobs:
release:
name: release ${{ matrix.target }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-pc-windows-gnu
archive: zip
- target: x86_64-unknown-linux-musl
archive: tar.gz tar.xz tar.zst
- target: x86_64-apple-darwin
archive: zip
steps:
- uses: actions/checkout@master
- name: Compile and release
uses: rust-build/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
RUSTTARGET: ${{ matrix.target }}
ARCHIVE_TYPES: ${{ matrix.archive }}

0 comments on commit a90da12

Please sign in to comment.