diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6044a99..2d98f00 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,17 +36,17 @@ jobs: matrix: platform: - os_name: linux-x86_64 - os: ubuntu-22.04 + os: ubuntu-20.04 target: x86_64-unknown-linux-gnu bin: skynet name: skynet-linux-x86_64.tar.gz - os_name: linux-i686 - os: ubuntu-22.04 + os: ubuntu-20.04 target: i686-unknown-linux-gnu bin: skynet name: skynet-linux-i686.tar.gz - os_name: linux-aarch64 - os: ubuntu-22.04 + os: ubuntu-20.04 target: aarch64-unknown-linux-gnu bin: skynet name: skynet-linux-aarch64.tar.gz @@ -81,6 +81,12 @@ jobs: shell: bash run: | echo "${{ steps.protoc-install.outputs.path }}" >> $GITHUB_PATH + - name: Update gcc + if: ${{ matrix.platform.os == 'ubuntu-20.04'}} + shell: bash + run: | + echo "CC=gcc-10" >> $GITHUB_ENV + echo "CXX=g++-10" >> $GITHUB_ENV - name: Build binary uses: houseabsolute/actions-rust-cross@v0 with: diff --git a/.github/workflows/plugin_release.yml b/.github/workflows/plugin_release.yml index c85b02a..43e5494 100644 --- a/.github/workflows/plugin_release.yml +++ b/.github/workflows/plugin_release.yml @@ -35,15 +35,15 @@ jobs: matrix: platform: - os_name: linux-x86_64 - os: ubuntu-22.04 + os: ubuntu-20.04 target: x86_64-unknown-linux-gnu lib: lib$d.so - os_name: linux-i686 - os: ubuntu-22.04 + os: ubuntu-20.04 target: i686-unknown-linux-gnu lib: lib$d.so - os_name: linux-aarch64 - os: ubuntu-22.04 + os: ubuntu-20.04 target: aarch64-unknown-linux-gnu lib: lib$d.so - os_name: windows-x86_64 @@ -74,6 +74,12 @@ jobs: shell: bash run: | echo "${{ steps.protoc-install.outputs.path }}" >> $GITHUB_PATH + - name: Update gcc + if: ${{ matrix.platform.os == 'ubuntu-20.04'}} + shell: bash + run: | + echo "CC=gcc-10" >> $GITHUB_ENV + echo "CXX=g++-10" >> $GITHUB_ENV - name: Build binary uses: houseabsolute/actions-rust-cross@v0 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ce4a518..de8b9c2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,17 +35,17 @@ jobs: matrix: platform: - os_name: linux-x86_64 - os: ubuntu-22.04 + os: ubuntu-20.04 target: x86_64-unknown-linux-gnu bin: skynet name: skynet-linux-x86_64.tar.gz - os_name: linux-i686 - os: ubuntu-22.04 + os: ubuntu-20.04 target: i686-unknown-linux-gnu bin: skynet name: skynet-linux-i686.tar.gz - os_name: linux-aarch64 - os: ubuntu-22.04 + os: ubuntu-20.04 target: aarch64-unknown-linux-gnu bin: skynet name: skynet-linux-aarch64.tar.gz @@ -80,6 +80,12 @@ jobs: shell: bash run: | echo "${{ steps.protoc-install.outputs.path }}" >> $GITHUB_PATH + - name: Update gcc + if: ${{ matrix.platform.os == 'ubuntu-20.04'}} + shell: bash + run: | + echo "CC=gcc-10" >> $GITHUB_ENV + echo "CXX=g++-10" >> $GITHUB_ENV - name: Build binary uses: houseabsolute/actions-rust-cross@v0 with: diff --git a/Dockerfile b/Dockerfile index 44bcc11..047191e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 +FROM ubuntu:latest ARG TARGETARCH RUN useradd -s /usr/sbin/nologin -r -c "Skynet User" skynet diff --git a/README.md b/README.md index 4c3a498..a9d5f01 100644 --- a/README.md +++ b/README.md @@ -15,10 +15,12 @@ We offer pre-built `x86_64` and `aarch64` docker images. 2. `docker-compose up` 3. Visit `localhost:8080`. -### Pre-built libraries +### Run natively **We do not recommend this method, use at your own risk!** -You can download pre-built libraries in our [release](https://github.com/MXWXZ/skynet/releases) page. Linux versions are built under ubuntu-22.04. If you meet glibc version errors, please build from source. +You can download pre-built libraries in our [release](https://github.com/MXWXZ/skynet/releases) page. + +We offer `linux-{x86_64,i686,aarch64}`, `darwin-{x86_64,aarch64}` and `windows-x86_64` binaries. You might build from source if your platform is not included. 1. Download the release and extract. 2. (Optional) Install redis on your machine.