Skip to content

Commit

Permalink
Fix the github action env issue
Browse files Browse the repository at this point in the history
  • Loading branch information
dreampiggy committed Sep 26, 2023
1 parent 1b1ce79 commit 3f10b6a
Showing 1 changed file with 86 additions and 86 deletions.
172 changes: 86 additions & 86 deletions .github/workflows/librav1e-xcode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,89 +13,89 @@ jobs:
env:
DEVELOPER_DIR: /Applications/Xcode_13.4.1.app
steps:
- name: checkout
uses: actions/[email protected]
- name: Set up cargo cache
uses: actions/[email protected]
with:
path: |
~/.cargo/registry
~/.cargo/git
rav1e/target
key: "${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}"
- name: Set up cache
uses: actions/[email protected]
with:
path: "${{ github.workspace }}/.cargo"
key: "${{ runner.os }}-path"
- uses: actions-rs/[email protected]
with:
toolchain: 1.51.0
- run: env
- run: locale
- run: xcodebuild -version
- run: xcodebuild -showsdks
- run: rustup target add aarch64-apple-ios x86_64-apple-ios aarch64-apple-darwin x86_64-apple-darwin
- run: cargo install cargo-lipo
- run: cargo install cbindgen
- run: cargo install cargo-crate-type
- run: HOMEBREW_NO_AUTO_UPDATE=1 brew install nasm
- run: set -o pipefail
- run: mkdir include
- run: rm -rf rav1e
- run: git clone -b "v${{ github.ref_name }}" --depth 1 https://github.com/xiph/rav1e.git
# iOS
- run: rm -rf ${{ github.workspace }}/rav1e/target/
- run: cd ${{ github.workspace }}/rav1e
- run: ls -lash
- run: cbindgen -c cbindgen.toml -l C -o include/rav1e/rav1e.h --crate rav1e .
- run: cargo crate-type static
- run: cargo lipo --release --no-default-features --features "asm capi" --targets=aarch64-apple-ios,x86_64-apple-ios
- run: cd ${{ github.workspace }}
- run: mkdir -p Build
- run: cd Build
- run: mkdir iOS
- run: cd iOS
- run: mkdir librav1e.framework
- run: cd librav1e.framework
- run: mkdir Headers
- run: mkdir Modules
- run: cp ${{ github.workspace }}/rav1e/target/universal/release/librav1e.a librav1e
- run: cp ${{ github.workspace }}/rav1e/include/rav1e/rav1e.h Headers/
- run: cp ${{ github.workspace }}/module.modulemap Modules/
# MacOS
- run: rm -rf ${{ github.workspace }}/rav1e/target/
- run: cd ${{ github.workspace }}/rav1e
- run: ls -lash
- run: cargo lipo --release --no-default-features --features "asm capi" --targets=aarch64-apple-darwin,x86_64-apple-darwin
- run: cd ${{ github.workspace }}
- run: mkdir -p Build
- run: cd Build
- run: mkdir Mac
- run: cd Mac
- run: mkdir librav1e.framework
- run: cd librav1e.framework
- run: mkdir Versions
- run: cd Versions
- run: mkdir A
- run: ln -s A Current
- run: cd A
- run: mkdir Headers
- run: mkdir Modules
- run: cp ${{ github.workspace }}/rav1e/target/universal/release/librav1e.a librav1e
- run: cp ${{ github.workspace }}/rav1e/include/rav1e/rav1e.h Headers/
- run: cp ${{ github.workspace }}/module.modulemap Modules/
- run: cd ../../
- run: ln -s Versions/Current/librav1e librav1e
- run: ln -s Versions/Current/Headers Headers
- run: ln -s Versions/Current/Modules Modules
# Zip
- run: cd ${{ github.workspace }}
- run: cd Build
- run: zip -y -r librav1e.zip Mac/ iOS/
- uses: softprops/[email protected]
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
GITHUB_REPOSITORY: "${{ github.repository }}"
with:
files: "${{ github.workspace }}/Build/librav1e.zip"
- uses: actions/checkout@v4.0.0
- name: Set up cargo cache
uses: actions/cache@v3.3.2
with:
path: |
~/.cargo/registry
~/.cargo/git
rav1e/target
key: "${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}"
- name: Set up cache
uses: actions/cache@v3.3.2
with:
path: "${{ github.workspace }}/.cargo"
key: "${{ runner.os }}-path"
- uses: actions-rs/[email protected]
with:
toolchain: 1.51.0
- run: echo "${{ github.workspace }}"
- run: env
- run: locale
- run: xcodebuild -version
- run: xcodebuild -showsdks
- run: rustup target add aarch64-apple-ios x86_64-apple-ios aarch64-apple-darwin x86_64-apple-darwin
- run: cargo install cargo-lipo
- run: cargo install cbindgen
- run: cargo install cargo-crate-type
- run: HOMEBREW_NO_AUTO_UPDATE=1 brew install nasm
- run: set -o pipefail
- run: mkdir include
- run: rm -rf rav1e
- run: git clone -b "v${{ github.ref_name }}" --depth 1 https://github.com/xiph/rav1e.git
# iOS
- run: rm -rf "${{ github.workspace }}/rav1e/target"
- run: cd "${{ github.workspace }}/rav1e"
- run: ls -lash
- run: cbindgen -c cbindgen.toml -l C -o include/rav1e/rav1e.h --crate rav1e .
- run: cargo crate-type static
- run: cargo lipo --release --no-default-features --features "asm capi" --targets=aarch64-apple-ios,x86_64-apple-ios
- run: cd "${{ github.workspace }}"
- run: mkdir -p Build
- run: cd Build
- run: mkdir iOS
- run: cd iOS
- run: mkdir librav1e.framework
- run: cd librav1e.framework
- run: mkdir Headers
- run: mkdir Modules
- run: cp "${{ github.workspace }}/rav1e/target/universal/release/librav1e.a" librav1e
- run: cp "${{ github.workspace }}/rav1e/include/rav1e/rav1e.h" Headers/
- run: cp "${{ github.workspace }}/module.modulemap" Modules/
# MacOS
- run: rm -rf "${{ github.workspace }}/rav1e/target"
- run: cd "${{ github.workspace }}/rav1e"
- run: ls -lash
- run: cargo lipo --release --no-default-features --features "asm capi" --targets=aarch64-apple-darwin,x86_64-apple-darwin
- run: cd "${{ github.workspace }}"
- run: mkdir -p Build
- run: cd Build
- run: mkdir Mac
- run: cd Mac
- run: mkdir librav1e.framework
- run: cd librav1e.framework
- run: mkdir Versions
- run: cd Versions
- run: mkdir A
- run: ln -s A Current
- run: cd A
- run: mkdir Headers
- run: mkdir Modules
- run: cp "${{ github.workspace }}/rav1e/target/universal/release/librav1e.a" librav1e
- run: cp "${{ github.workspace }}/rav1e/include/rav1e/rav1e.h" Headers/
- run: cp "${{ github.workspace }}/module.modulemap" Modules/
- run: cd ../../
- run: ln -s Versions/Current/librav1e librav1e
- run: ln -s Versions/Current/Headers Headers
- run: ln -s Versions/Current/Modules Modules
# Zip
- run: cd "${{ github.workspace }}"
- run: cd Build
- run: zip -y -r librav1e.zip Mac/ iOS/
- uses: softprops/[email protected]
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
GITHUB_REPOSITORY: "${{ github.repository }}"
with:
files: "${{ github.workspace }}/Build/librav1e.zip"

0 comments on commit 3f10b6a

Please sign in to comment.