no longer depends on openssl

This commit is contained in:
Robin Appelman 2021-07-31 16:58:03 +02:00
commit 1daec9dafc
4 changed files with 14 additions and 10 deletions

View file

@ -11,21 +11,25 @@ jobs:
runs-on: ubuntu-18.04 runs-on: ubuntu-18.04
steps: steps:
- name: musl-tools
run: |
sudo apt-get install musl-tools
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1 - uses: actions-rs/toolchain@v1
with: with:
profile: minimal profile: minimal
toolchain: stable toolchain: stable
override: true override: true
target: x86_64-unknown-linux-musl
- uses: Swatinem/rust-cache@v1 - uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1 - uses: actions-rs/cargo@v1
with: with:
command: build command: build
args: --release args: --release --target x86_64-unknown-linux-musl
- name: Upload binary to release - name: Upload binary to release
uses: svenstaro/upload-release-action@v2 uses: svenstaro/upload-release-action@v2
with: with:
repo_token: ${{ secrets.GITHUB_TOKEN }} repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/dispenser file: target/x86_64-unknown-linux-musl/release/dispenser
asset_name: dispenser asset_name: dispenser
tag: ${{ github.ref }} tag: ${{ github.ref }}

View file

@ -20,21 +20,25 @@ jobs:
build: build:
name: Build name: Build
runs-on: ubuntu-18.04 runs-on: ubuntu-20.04
steps: steps:
- name: musl-tools
run: |
sudo apt-get install musl-tools
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1 - uses: actions-rs/toolchain@v1
with: with:
profile: minimal profile: minimal
toolchain: stable toolchain: stable
override: true override: true
target: x86_64-unknown-linux-musl
- uses: Swatinem/rust-cache@v1 - uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1 - uses: actions-rs/cargo@v1
with: with:
command: build command: build
args: --release args: --release --target x86_64-unknown-linux-musl
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: dispenser name: dispenser
path: target/release/dispenser path: target/x86_64-unknown-linux-musl/release/dispenser

View file

@ -13,7 +13,7 @@ RUN sudo chown -R rust:rust . && \
touch src/main.rs && \ touch src/main.rs && \
cargo build --release cargo build --release
FROM alpine:latest FROM scratch
COPY --from=build /home/rust/src/target/x86_64-unknown-linux-musl/release/dispenser / COPY --from=build /home/rust/src/target/x86_64-unknown-linux-musl/release/dispenser /

View file

@ -18,10 +18,6 @@ This does mean that if the program is (re-)started while a server is already act
start and destroy any server because it can't be sure it should control the running server. start and destroy any server because it can't be sure it should control the running server.
You'll need to manually destroy the existing server in that case. You'll need to manually destroy the existing server in that case.
## Dependencies
- requires openssl 1.1
## TODO ## TODO
- [ ] don't blindly kill server if there are players connected - [ ] don't blindly kill server if there are players connected