-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrite in Rust
- Loading branch information
Showing
27 changed files
with
1,724 additions
and
98 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: GNU/Linux | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
|
||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
rust: | ||
- stable | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- run: git config --global core.autocrlf false | ||
- uses: actions/checkout@v2 | ||
- name: Build | ||
run: cargo build --all --locked --verbose |
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,22 @@ | ||
name: macOS | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
|
||
strategy: | ||
matrix: | ||
os: | ||
- macos-latest | ||
rust: | ||
- stable | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- run: git config --global core.autocrlf false | ||
- uses: actions/checkout@v2 | ||
- name: Build | ||
run: cargo build --all --locked --verbose |
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,22 @@ | ||
name: Windows | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
|
||
strategy: | ||
matrix: | ||
os: | ||
- windows-latest | ||
rust: | ||
- stable | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- run: git config --global core.autocrlf false | ||
- uses: actions/checkout@v2 | ||
- name: Build | ||
run: cargo build --all --locked --verbose |
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,97 @@ | ||
# CD GitHub Actions workflow for dataurl | ||
|
||
name: CD | ||
|
||
on: | ||
release: | ||
types: | ||
- created | ||
|
||
jobs: | ||
|
||
windows: | ||
runs-on: windows-2019 | ||
steps: | ||
- run: git config --global core.autocrlf false | ||
- name: Checkout the repository | ||
uses: actions/checkout@v2 | ||
- name: Build the executable | ||
run: cargo build --release | ||
- uses: Shopify/[email protected] | ||
with: | ||
name: dataurl.exe | ||
path: target\release\dataurl.exe | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
gnu_linux_armhf: | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v2 | ||
- name: Prepare cross-platform environment | ||
run: | | ||
sudo mkdir /cross-build | ||
sudo touch /etc/apt/sources.list.d/armhf.list | ||
echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ bionic main" | sudo tee -a /etc/apt/sources.list.d/armhf.list | ||
sudo apt-get update | ||
sudo apt-get install -y gcc-arm-linux-gnueabihf libc6-armhf-cross libc6-dev-armhf-cross | ||
sudo apt-get download libssl1.1:armhf libssl-dev:armhf | ||
sudo dpkg -x libssl1.1*.deb /cross-build | ||
sudo dpkg -x libssl-dev*.deb /cross-build | ||
rustup target add arm-unknown-linux-gnueabihf | ||
echo "C_INCLUDE_PATH=/cross-build/usr/include" >> $GITHUB_ENV | ||
echo "OPENSSL_INCLUDE_DIR=/cross-build/usr/include/arm-linux-gnueabihf" >> $GITHUB_ENV | ||
echo "OPENSSL_LIB_DIR=/cross-build/usr/lib/arm-linux-gnueabihf" >> $GITHUB_ENV | ||
echo "PKG_CONFIG_ALLOW_CROSS=1" >> $GITHUB_ENV | ||
echo "RUSTFLAGS=-C linker=arm-linux-gnueabihf-gcc -L/usr/arm-linux-gnueabihf/lib -L/cross-build/usr/lib/arm-linux-gnueabihf -L/cross-build/lib/arm-linux-gnueabihf" >> $GITHUB_ENV | ||
- name: Build the executable | ||
run: cargo build --release --target=arm-unknown-linux-gnueabihf | ||
- name: Attach artifact to the release | ||
uses: Shopify/[email protected] | ||
with: | ||
name: dataurl-gnu-linux-armhf | ||
path: target/arm-unknown-linux-gnueabihf/release/dataurl | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
gnu_linux_aarch64: | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v2 | ||
- name: Prepare cross-platform environment | ||
run: | | ||
sudo mkdir /cross-build | ||
sudo touch /etc/apt/sources.list.d/arm64.list | ||
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ bionic main" | sudo tee -a /etc/apt/sources.list.d/arm64.list | ||
sudo apt-get update | ||
sudo apt-get install -y gcc-aarch64-linux-gnu libc6-arm64-cross libc6-dev-arm64-cross | ||
sudo apt-get download libssl1.1:arm64 libssl-dev:arm64 | ||
sudo dpkg -x libssl1.1*.deb /cross-build | ||
sudo dpkg -x libssl-dev*.deb /cross-build | ||
rustup target add aarch64-unknown-linux-gnu | ||
echo "C_INCLUDE_PATH=/cross-build/usr/include" >> $GITHUB_ENV | ||
echo "OPENSSL_INCLUDE_DIR=/cross-build/usr/include/aarch64-linux-gnu" >> $GITHUB_ENV | ||
echo "OPENSSL_LIB_DIR=/cross-build/usr/lib/aarch64-linux-gnu" >> $GITHUB_ENV | ||
echo "PKG_CONFIG_ALLOW_CROSS=1" >> $GITHUB_ENV | ||
echo "RUSTFLAGS=-C linker=aarch64-linux-gnu-gcc -L/usr/aarch64-linux-gnu/lib -L/cross-build/usr/lib/aarch64-linux-gnu" >> $GITHUB_ENV | ||
- name: Build the executable | ||
run: cargo build --release --target=aarch64-unknown-linux-gnu | ||
- name: Attach artifact to the release | ||
uses: Shopify/[email protected] | ||
with: | ||
name: dataurl-gnu-linux-aarch64 | ||
path: target/aarch64-unknown-linux-gnu/release/dataurl | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
gnu_linux_x86_64: | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v2 | ||
- name: Build the executable | ||
run: cargo build --release | ||
- uses: Shopify/[email protected] | ||
with: | ||
name: dataurl-gnu-linux-x86_64 | ||
path: target/release/dataurl | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} |
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,34 @@ | ||
# CI GitHub Actions workflow for dataurl | ||
|
||
name: CI | ||
|
||
on: | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build_and_test: | ||
|
||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
- macos-latest | ||
- windows-latest | ||
rust: | ||
- stable | ||
- beta | ||
- nightly | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- run: git config --global core.autocrlf false | ||
- uses: actions/checkout@v2 | ||
- name: Build | ||
run: cargo build --all --locked --verbose | ||
- name: Run tests | ||
run: cargo test --all --locked --verbose | ||
- name: Check code formatting | ||
run: | | ||
rustup component add rustfmt | ||
cargo fmt --all -- --check |
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,6 @@ | ||
# Generated by Cargo | ||
# will have compiled files and executables | ||
/target/ | ||
|
||
# These are backup files generated by rustfmt | ||
**/*.rs.bk |
Oops, something went wrong.