Skip to content

Commit

Permalink
feat: 升级截图库,修改编译脚本
Browse files Browse the repository at this point in the history
0.1.7
  • Loading branch information
nashaofu committed Sep 29, 2023
1 parent 0765221 commit 7114194
Show file tree
Hide file tree
Showing 34 changed files with 1,135 additions and 1,105 deletions.
13 changes: 1 addition & 12 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
[target.x86_64-unknown-linux-gnu]
rustflags = ["-L", "native=/usr/lib/x86_64-linux-gnu/"]

[target.aarch64-unknown-linux-gnu]
rustflags = ["-L", "native=/usr/aarch64-unknown-linux-gnu/"]

[target.aarch64-unknown-linux-musl]
linker = "aarch64-linux-musl-gcc"
rustflags = [
"-C",
"target-feature=-crt-static",
"-L",
"native=/usr/lib/",
]
rustflags = ["-C", "target-feature=-crt-static"]
52 changes: 26 additions & 26 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
{
"name": "Node.js & TypeScript",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/typescript-node:1-18-bullseye",
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/desktop-lite:1": {},
"ghcr.io/devcontainers/features/rust:1": {}
},
"name": "Node.js & TypeScript",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/typescript-node:1-18-bullseye",
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/desktop-lite:1": {},
"ghcr.io/devcontainers/features/rust:1": {}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [6080],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [6080],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "yarn install",
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "yarn install",

// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"wengerk.highlight-bad-chars",
"streetsidesoftware.code-spell-checker",
"EditorConfig.EditorConfig",
"esbenp.prettier-vscode",
"rust-lang.rust-analyzer",
"foxundermoon.shell-format"
]
// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"wengerk.highlight-bad-chars",
"streetsidesoftware.code-spell-checker",
"EditorConfig.EditorConfig",
"esbenp.prettier-vscode",
"rust-lang.rust-analyzer",
"foxundermoon.shell-format"
]
}
}
}

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
indent_size = 4
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
104 changes: 52 additions & 52 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -1,65 +1,65 @@
name: docker-publish

on:
workflow_dispatch: # 手动触发
push:
branches: ["master"]
# Publish semver tags as releases.
tags: ["v*.*.*"]
pull_request:
branches: ["master"]
workflow_dispatch: # 手动触发
push:
branches: ["master"]
# Publish semver tags as releases.
tags: ["v*.*.*"]
pull_request:
branches: ["master"]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io

jobs:
build-desktop:
strategy:
fail-fast: false
matrix:
platform:
- alpine
- debian
node:
- 14
- 16
- 18
name: build node-desktop:${{ matrix.node }}-${{ matrix.platform }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
build-desktop:
strategy:
fail-fast: false
matrix:
platform:
- alpine
- debian
node:
- 14
- 16
- 18
name: build node-desktop:${{ matrix.node }}-${{ matrix.platform }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup QEMU
uses: docker/setup-qemu-action@v2
- name: Setup QEMU
uses: docker/setup-qemu-action@v2

# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Docker Setup Buildx
uses: docker/setup-buildx-action@v2
# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Docker Setup Buildx
uses: docker/setup-buildx-action@v2

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: ./docker
file: ./docker/${{ matrix.platform }}.Dockerfile
push: ${{ github.event_name != 'pull_request' }}
build-args: |
VERSION=${{ matrix.node }}
tags: ${{ env.REGISTRY }}/${{ github.repository }}/node-desktop:${{ matrix.node }}-${{ matrix.platform }}
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: ./docker
file: ./docker/${{ matrix.platform }}.Dockerfile
push: ${{ github.event_name != 'pull_request' }}
build-args: |
VERSION=${{ matrix.node }}
tags: ${{ env.REGISTRY }}/${{ github.repository }}/node-desktop:${{ matrix.node }}-${{ matrix.platform }}
39 changes: 39 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Lint

on:
push:
branches:
- master
tags-ignore:
- "**"
pull_request: null

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint:
strategy:
fail-fast: false
matrix:
host:
- macos-latest
- windows-latest
- ubuntu-latest
name: Lint on ${{ matrix.host }}
runs-on: ${{ matrix.host }}
steps:
- uses: actions/checkout@v3

- name: Install rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy

- name: Cargo fmt
run: cargo fmt -- --check

- name: Clippy
run: cargo clippy
Loading

0 comments on commit 7114194

Please sign in to comment.