diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7259a62..22a48dc 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -9,16 +9,33 @@ on: jobs: publish-ubuntu: - name: Publish for Linux - runs-on: ubuntu-22.04 + name: Publish for Linux and Windows + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + - os: ubuntu-20.04 + artifact_name: libfast_image_encoder.so + - os: windows-latest + artifact_name: fast_image_encoder.dll steps: - uses: actions/checkout@v3 - - name: Docker build - working-directory: Docker - run: docker build -t ubuntu-18 . - - name: Docker run - working-directory: Docker - run: docker run -e TOKEN=${{ secrets.TOKEN }} -e VERSION=${{ inputs.version }} ubuntu-18 + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + toolchain: 1.71.0 + - name: cargo build + working-directory: rs/fast_image_encoder + run: cargo build --release + - name: Upload binaries to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.TOKEN }} + file: rs/fast_image_encoder/target/release/${{ matrix.artifact_name }} + asset_name: ${{ matrix.artifact_name }} + tag: ${{ inputs.version }} + release_name: ${{ inputs.version }} + overwrite: true publish-macos: name: Publish for MacOS runs-on: macos-latest @@ -53,21 +70,3 @@ jobs: publish-windows: name: Publish for Windows runs-on: windows-latest - steps: - - uses: actions/checkout@v3 - - name: Install Rust - uses: dtolnay/rust-toolchain@stable - with: - toolchain: 1.71.0 - - name: cargo build - working-directory: rs/fast_image_encoder - run: cargo build --release - - name: Upload binaries to release - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.TOKEN }} - file: rs/fast_image_encoder/target/release/fast_image_encoder.dll - asset_name: fast_image_encoder.dll - tag: ${{ inputs.version }} - release_name: ${{ inputs.version }} - overwrite: true diff --git a/Docker/dockerfile b/Docker/dockerfile deleted file mode 100644 index 617c3c2..0000000 --- a/Docker/dockerfile +++ /dev/null @@ -1,24 +0,0 @@ -FROM ubuntu:bionic@sha256:dca176c9663a7ba4c1f0e710986f5a25e672842963d95b960191e2d9f7185ebe - -ENV TOKEN ${TOKEN} -ENV VERSION ${VERSION} - -RUN apt-get -qq update && apt-get -qq install -y sudo curl wget git python3 python3-pip - -RUN python3 -m pip install PyGithub - -RUN curl https://sh.rustup.rs -sSf | sh -s -- -y - -ENV PATH="/root/.cargo/bin:${PATH}" - -RUN git clone https://github.com/subalterngames/fast_image_encoder.git - -WORKDIR ./fast_image_encoder/rs/fast_image_encoder - -RUN cargo build --release - -RUN cp target/release/libfast_image_encoder.so ../py/libfast_image_encoder.so - -WORKDIR ../py - -RUN python3 upload.py --token ${TOKEN} --version ${VERSION} \ No newline at end of file diff --git a/changelog.md b/changelog.md index a50b6a4..d3c6167 100644 --- a/changelog.md +++ b/changelog.md @@ -2,7 +2,7 @@ - Reverted the option to flip raw image data because it's faster to do it on the GPU. - Updated the Unity example to show how to flip the texture. -- Fixed the Ubuntu dockerfile. +- Removed Ubuntu dockerfile. Fast Image Encoder is now supported on Ubuntu 20 and up. # 0.1.3 diff --git a/py/upload.py b/py/upload.py deleted file mode 100644 index 23efb2e..0000000 --- a/py/upload.py +++ /dev/null @@ -1,29 +0,0 @@ -from argparse import ArgumentParser -from github import Github, Repository, GitRelease - -""" -Upload a release. This is called by the Ubuntu 18 Docker container. -""" - -parser = ArgumentParser() -parser.add_argument("--token", type=str) -parser.add_argument("--version", type=str) -args = parser.parse_args() - -repo: Repository = Github(args.token).get_repo("subalterngames/fast_image_encoder") -release: GitRelease = repo.get_release(args.version) - -# Create the release. -if release is None: - release = repo.create_git_release(tag=args.version, - name=args.version, - message="TODO edit this", - prerelease=False, - target_commitish="main", - draft=False) - print(f"Created release: {args.version}") -# Upload. -release.upload_asset(path="libfast_image_encoder.so", - name="libfast_image_encoder.so", - content_type="application/x-msdownload") -print("Uploaded release.")