added CI
This commit is contained in:
parent
834194f731
commit
d0529b01ce
1 changed files with 46 additions and 0 deletions
46
.forgejo/workflows/rust_build.yml
Normal file
46
.forgejo/workflows/rust_build.yml
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
name: Cross-Compile for Windows with Podman
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Rust
|
||||
uses: https://github.com/actions/setup-rust@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
components: rust-src
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y podman uidmap fuse-overlayfs
|
||||
mkdir -p ~/.config/containers
|
||||
|
||||
- name: Configure Rootless Podman
|
||||
run: |
|
||||
sudo sh -c "echo 'runner:100000:65536' >> /etc/subuid"
|
||||
sudo sh -c "echo 'runner:100000:65536' >> /etc/subgid"
|
||||
export XDG_RUNTIME_DIR=/tmp/runtime-runner
|
||||
mkdir -p $XDG_RUNTIME_DIR
|
||||
podman info
|
||||
|
||||
- name: Install cross
|
||||
run: cargo install cross
|
||||
|
||||
- name: Build with cross using Podman
|
||||
env:
|
||||
CROSS_CONTAINER_ENGINE: podman
|
||||
XDG_RUNTIME_DIR: /tmp/runtime-runner
|
||||
run: cross build --target x86_64-pc-windows-gnu -r
|
||||
|
||||
Loading…
Add table
Reference in a new issue