From d01c96c1de5fc1afc78ce9f8da4fd1d97ab849c9 Mon Sep 17 00:00:00 2001 From: wucke13 Date: Sat, 10 Jun 2023 15:18:09 +0200 Subject: [PATCH] add i686 system This still excludes static builds due to a bug in oqs-sys. Once oqs-sys is bumped to use liboqs 0.8, full 32 bit x86 support is viable. --- .ci/gen-workflow-files.nu | 13 +++++++-- .github/workflows/nix.yaml | 48 ++++++++++++++++++++++++++++++++++ .github/workflows/release.yaml | 21 +++++++++++++++ 3 files changed, 80 insertions(+), 2 deletions(-) diff --git a/.ci/gen-workflow-files.nu b/.ci/gen-workflow-files.nu index db42d00..4a7d2eb 100755 --- a/.ci/gen-workflow-files.nu +++ b/.ci/gen-workflow-files.nu @@ -9,8 +9,7 @@ let systems_map = { # aarch64-darwin # aarch64-linux - # TODO this one can be enabled once a oqs-sys with liboqs 0.8 is released, this can be enabled - # i686-linux: ubuntu-latest, + i686-linux: ubuntu-latest, x86_64-darwin: macos-latest, x86_64-linux: ubuntu-latest } @@ -72,6 +71,16 @@ for system in ($targets | columns) { let derivations = ($targets | get $system) for derivation in $derivations { + if ($system == "i686-linux") and ($derivation | str contains "static") { + log info $"skipping ($system).($derivation), due to liboqs 0.8 not present in oqs-sys" + continue + } + + if ($system == "i686-linux") and ($derivation | str contains "release-package") { + log info $"skipping ($system).($derivation), due to liboqs 0.8 not present in oqs-sys" + continue + } + # skip the default derivation, its an alias of the rosenpass derivation if ($derivation == "default") { continue diff --git a/.github/workflows/nix.yaml b/.github/workflows/nix.yaml index 693018c..184b07f 100644 --- a/.github/workflows/nix.yaml +++ b/.github/workflows/nix.yaml @@ -7,6 +7,54 @@ on: branches: - main jobs: + i686-linux---rosenpass: + name: Build i686-linux.rosenpass + runs-on: + - ubuntu-latest + needs: [] + steps: + - uses: actions/checkout@v3 + - uses: cachix/install-nix-action@v21 + with: + nix_path: nixpkgs=channel:nixos-unstable + - uses: cachix/cachix-action@v12 + with: + name: rosenpass + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} + - name: Build + run: nix build .#packages.i686-linux.rosenpass --print-build-logs + i686-linux---rosenpass-oci-image: + name: Build i686-linux.rosenpass-oci-image + runs-on: + - ubuntu-latest + needs: + - i686-linux---rosenpass + steps: + - uses: actions/checkout@v3 + - uses: cachix/install-nix-action@v21 + with: + nix_path: nixpkgs=channel:nixos-unstable + - uses: cachix/cachix-action@v12 + with: + name: rosenpass + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} + - name: Build + run: nix build .#packages.i686-linux.rosenpass-oci-image --print-build-logs + i686-linux---check: + name: Run Nix checks on i686-linux + runs-on: + - ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: cachix/install-nix-action@v21 + with: + nix_path: nixpkgs=channel:nixos-unstable + - uses: cachix/cachix-action@v12 + with: + name: rosenpass + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} + - name: Check + run: nix flake check . --print-build-logs x86_64-darwin---release-package: name: Build x86_64-darwin.release-package runs-on: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 6a05561..027bb6d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -6,6 +6,27 @@ on: tags: - v* jobs: + i686-linux---release: + name: Build release artifacts for i686-linux + runs-on: + - ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: cachix/install-nix-action@v21 + with: + nix_path: nixpkgs=channel:nixos-unstable + - uses: cachix/cachix-action@v12 + with: + name: rosenpass + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} + - name: Build release + run: nix build .#release-package --print-build-logs + - name: Release + uses: softprops/action-gh-release@v1 + with: + draft: ${{ contains(github.ref_name, 'rc') }} + prerelease: ${{ contains(github.ref_name, 'alpha') || contains(github.ref_name, 'beta') }} + files: result/* x86_64-darwin---release: name: Build release artifacts for x86_64-darwin runs-on: