Skip to content

Commit

Permalink
add test dependency in ci to prevent 403
Browse files Browse the repository at this point in the history
  • Loading branch information
siq1 committed Aug 21, 2024
1 parent 96c7a99 commit 6d584ea
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 57 deletions.
51 changes: 46 additions & 5 deletions .github/workflows/build_libs.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
name: Build libs
name: ci

on:
push:
branches:
- rust_rewrite

env:
RUSTFLAGS: "-Dwarnings"
RUST_BACKTRACE: 1

jobs:
build:
build-rust:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
Expand All @@ -26,8 +29,8 @@ jobs:
name: build-${{ matrix.os }}
path: expander_compiler/target/release/libec_go_lib.*

upload:
needs: build
upload-rust:
needs: build-rust
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -50,3 +53,41 @@ jobs:
git add ./libec_go_lib.* -f
git commit -m "Add built libs"
git push -f --set-upstream origin rust-built-libs
test-rust:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: styfle/[email protected]
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
workspaces: "expander_compiler -> expander_compiler/target"
- run: cargo test --manifest-path=expander_compiler/Cargo.toml

test-go:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
needs: build-rust
steps:
- uses: styfle/[email protected]
- uses: actions/checkout@v4
- name: Setup Go 1.21.x
uses: actions/setup-go@v5
with:
go-version: '1.21.x'
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: ./artifacts
pattern: build-${{ matrix.os }}
merge-multiple: true
- run: |
cp artifacts/libec_go_lib.* ecgo/compile/wrapper/
cd ecgo
go test ./test/
52 changes: 0 additions & 52 deletions .github/workflows/tests.yml

This file was deleted.

0 comments on commit 6d584ea

Please sign in to comment.