diff --git a/.cargo/config.toml b/.cargo/config.toml deleted file mode 100644 index 44d8036..0000000 --- a/.cargo/config.toml +++ /dev/null @@ -1,2 +0,0 @@ -[target.x86_64-unknown-linux-gnu] -linker = "x86_64-unknown-linux-gnu-gcc" \ No newline at end of file diff --git a/.github/workflows/rust-ci.yml b/.github/workflows/rust-ci.yml index 1152bf3..8afe832 100644 --- a/.github/workflows/rust-ci.yml +++ b/.github/workflows/rust-ci.yml @@ -15,7 +15,7 @@ jobs: toolchain: stable - name: Step 3 - Run cargo check - run: mv .env.example .env && rm -rf .cargo && cargo check + run: mv .env.example .env && cargo check fmt: runs-on: ubuntu-latest @@ -45,4 +45,25 @@ jobs: toolchain: stable - name: Step 3 - Run cargo clippy - run: mv .env.example .env && rm -rf .cargo && cargo clippy + run: mv .env.example .env && cargo clippy + + create-bin: + runs-on: ubuntu-latest + needs: check + steps: + - name: Step 1 - Check out main branch + uses: actions/checkout@v3 + + - name: Step 2 - Install rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + + - name: Step 3 - Run cargo build + run: cargo build --release + + - name: Step 4 - Publish binary as artifacts + uses: actions/upload-artifact@v3 + with: + name: starkwhale_alert + path: target/release/starkwhale_alert \ No newline at end of file diff --git a/crates/starkwhale-alert/src/main.rs b/crates/starkwhale-alert/src/main.rs index 1542f5a..82a0dbb 100644 --- a/crates/starkwhale-alert/src/main.rs +++ b/crates/starkwhale-alert/src/main.rs @@ -21,7 +21,6 @@ mod logger; mod starknet_id; mod twitter; -// TODO Add a job to create the executable on ubuntu // TODO If no block file ==> create one with latest #[tokio::main]