-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* adding build CI for user udpater Signed-off-by: danbugs <[email protected]> * clippy Signed-off-by: danbugs <[email protected]> * fmt Signed-off-by: danbugs <[email protected]> * update CI Signed-off-by: danbugs <[email protected]> * fixing build on windows, and adding caching Signed-off-by: danbugs <[email protected]> * added docker deploy action on PR merge onto main Signed-off-by: danbugs <[email protected]> * added caching to postgres Signed-off-by: danbugs <[email protected]> * meaningless change to test caching Signed-off-by: danbugs <[email protected]> * adding action for postgres and removing its caching 'cause it breaks build Signed-off-by: danbugs <[email protected]> * fixing CI Signed-off-by: danbugs <[email protected]> * fixing CI Signed-off-by: danbugs <[email protected]> --------- Signed-off-by: danbugs <[email protected]>
- Loading branch information
Showing
28 changed files
with
315 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[target.x86_64-pc-windows-msvc.pq] | ||
rustc-link-search = ["C:\\Program Files\\PostgreSQL\\16\\lib"] | ||
rustc-link-search = ["C:\\Program Files\\PostgreSQL\\14\\lib"] | ||
rustc-link-lib = ["libpq"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
lint-and-format: | ||
name: Lint with clippy and check formatting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
components: clippy, rustfmt | ||
override: true | ||
|
||
- name: Check formatting | ||
run: cargo fmt -- --check | ||
|
||
- name: Clippy check | ||
run: cargo clippy -p smithe_backend -p smithe_database -p smithe_lib -p startgg -- -D warnings | ||
build: | ||
needs: lint-and-format | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
include: | ||
- os: ubuntu-latest | ||
target: x86_64-unknown-linux-gnu | ||
- os: macos-latest | ||
target: x86_64-apple-darwin | ||
- os: windows-latest | ||
target: x86_64-pc-windows-msvc | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Cache Rust dependencies | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
|
||
- name: Install Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
target: ${{ matrix.target }} | ||
|
||
- if: matrix.os == 'windows-latest' | ||
name: Install PostgreSQL | ||
uses: ikalnytskyi/action-setup-postgres@v4 | ||
|
||
- name: Build | ||
run: cargo build --release --target ${{ matrix.target }} | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: my-binary-${{ matrix.target }} | ||
path: target/${{ matrix.target }}/release/my-binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Docker Deployment | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Download artifact | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: my-binary-x86_64-unknown-linux-gnu | ||
|
||
- name: Build Docker image | ||
run: | | ||
docker build -t pidgtm-user-updater:latest -f Dockerfile-UserUpdater . | ||
echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin | ||
docker push pidgtm-user-updater:latest |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM debian:buster-slim | ||
COPY target/x86_64-unknown-linux-gnu/release/pidgtm /usr/local/bin/pidgtm | ||
ENTRYPOINT ["pidgtm"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.